Write a program to print "Hello Java!" ten times.
Hello Java!
Hello Java!
Hello Java!
Hello Java!
Hello Java!
Hello Java!
Hello Java!
Hello Java!
Hello Java!
Hello Java!
The above problem statement is the extension of the the previous problem statement( Code #1).
For this question, for loop has been used having a counter variable i with initial value of 0 and having a condition less than 10. Further, there is an updation statement i++ which increases the value of the variable i by 1 after each iteration. Inside the for loop, there is a print statement System.out.println("Hello Java!").