Google Search

Monday, March 2, 2015

Write a Java Program to display a message on the screen


ALGORITHM

Step 1: Print “Welcome”

Step 2: Stop

PROGRAM: class msg

{

public static void main(String args[])

{

System.out.println("Welcome”);

}

}

OUTPUT:

D:\JAVA>set path=c:\java\bin

D:\JAVA>javac msg.java

D:\JAVA>java msg

Welcome


D:\JAVA>

0 comments:

Post a Comment