Skip to content
This repository was archived by the owner on Oct 1, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions HelloWorld/hello_world.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import java.util.Scanner;

public class hello_world {
public static void main(String[] args)
{
Scanner input = new Scanner (System.in);
//ask user for input
System.out.print("Enter your name: ");
String name = input.next();
//greet user
System.out.println("Hello "+name+"!");
}
}

//to run this program - in terminal we need to run the below commands:

//javac hello_world.java
//java hello_world