Q:

(Display five messages) Write a program that displays Welcome to Java five times

0

(Display five messages) Write a program that displays Welcome to Java five times.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

 // (Display five messages) Write a program that displays Welcome to Java five times.

public class Exercise_01_02 {

public static void main(String[] args) 

        for(int i=1;i<=5;i++){

            System.out.println("Welcome to Java");

        }

    }    

}

 

need an explanation for this answer? contact us directly to get an explanation for this answer
need an explanation for this answer? contact us directly to get an explanation for this answer

// (Display five messages) Write a program that displays Welcome to Java five times.
public class Exercise_01_02 {
	public static void main(String[] args) {
		System.out.println("Welcome to Java.");
		System.out.println("Welcome to Java.");
		System.out.println("Welcome to Java.");
		System.out.println("Welcome to Java.");
		System.out.println("Welcome to Java.");
	}
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (2)

Similar questions


need a help?


find thousands of online teachers now