Java Program – to list odd numbers using for loop.

Output: