Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1- Create a Helloworld.java file and edit it:
- $ nano Helloworld.java
- (you may use any other text editor)
- 2- Enter this code:
- public class Helloworld {
- public static void main(String[] arg) {
- System.out.println("Hello World!");
- }
- }
- 3- Write the file and quit nano.
- 4- Compile it:
- $ javac Helloworld.java
- 5- Run it:
- $ java -cp . Helloworld
- Expected Output:
- Hello World!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement