Java Program – to list even numbers using for loop.

Output: