Java Program to Print Welcome

Program should simply display "Welcome".

Sample Output 1:

Welcome

Try your Solution

Strongly recommended to Solve it on your own, Don't directly go to the solution given below.

public class Hello { public static void main(String args[]) { //Write your code here } }

Program or Solution

				
			
					
class Welcome
{
     public static void main(String args[])
     {
          System.out.println("Welcome");
     }

}



			
				
			

Output

Java Program to Print Welcome Output

Program Explanation

The Literal "Welcome " is printed in the console using println() function which is the part of System.out package.

Comments