Alright, on previous article i just show you how to install java on ubuntu, next in this article i'm going to teach you how to create the most basic java program ever, the hello world program on ubuntu.
Most people start with hello world program when they first learn new programming language, so that's why we need to create hello world program.
Step by step how to create java hello world program on ubuntu
- open command line (press CTRL + ALT + T) and then type the following command:
gedit HelloWorld.java
public class HelloWorld {
public static void main(String[] args) {
// Prints "Hello, World" to the terminal window.
System.out.println("Hello, World");
System.out.println("ubuntuhowtotips.blogspot.com is awesome blog !!");
}
}
javac HelloWorld.java
java HelloWorld
Congratulation you have just create your own first hello world program with java programming language on ubuntu operating system.
No comments:
Post a Comment