When you need to read the file go for while loop, if the number of iterations is not known. - For loop can also be used as a while. Do While Loop:- If you condition get false but you want to exceute ...
File Name Description P1.java Print numbers from 1 to 10 using a for loop P2.java Print even numbers between 1 and 50 P3.java Print squares of numbers from 30 to 45 P4.java Print cubes of odd numbers ...