Skip to main content

Posts

Showing posts with the label Basic

Code #2 | Hello Java Multiple Times | Java

Write a program to print "Hello Java!" ten times. Output: 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!") .

Code #1 | Hello Java | Basics of Java

Today starting with a very basic coding program in Java. So, the program is Write a program in Java to print "Hello Java!" Output: Hello Java!