Monday, 30 October 2017

java important promlems with solution



Write a program that displays Welcome to Java five times.

Discription:
                   By using five times System.out.println() it can be displayed.
Solution:
             public class Message {

    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");
    }
   
}

Output:
                       

No comments:

Post a Comment