Skip to content

This is the classic Hello World program in Java.

Notifications You must be signed in to change notification settings

MKS2345/JavaHelloWorld

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Java Hello World

This Java file contains the classic Hello World program in Java. Try tinkering with the code in the following ways to see what happens.

  1. Change the class from HelloWorld to helloworld. Recompile. What happens? Change it back. 2. It gives an error
  2. In the line containing System.out.println("Hello, world!");, try leaving out a quotation mark or the semi-colon. Recompile. What happens? Change it back. 3. It gives an error
  3. Try manipulating the "Hello, World!" String to say something else. Recompile. 4. The output chamges
  4. Based on your knowledge of programming, add the following line before the System.out.println(). String name = "Sam"; Try to get the line to print out what the value of name is. Notice that in Java, we need to declare the types of variables. 6. The output changes to sam

About

This is the classic Hello World program in Java.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%