Java Program to generate first n whole numbers using a do-while loop.

Output: