Java Program a simple demonstration of using for Loop.

Output: