Hello World in Java

Java Hello World program

Write a program to print Hello World and then print "I am your name " in a new line on screen.

Expected Output:

Hello World
I am Your Name

Java code to print Hello World and your name on screen:
public class HelloWorldJava {
    public static void main(String[] args) {                                                                      
        System.out.println("Hello World");
        System.out.println("I am John Baker");
    }
    
}
Output:
Hello World          
I am John Baker

No comments :

Post a Comment