For beginners when we learn new programming language for the first time, we always start with creating a simple program that print/echo to standard output, this simple program is usually a hello world program.
So in this post/article i want to show you how to create a hello world program with java on lubuntu operating system. We are going to need a text editor, for this demo i'm going to use leafpad text editor because that's the default text editor for lubuntu, but feel free to use other text editor such as vi, vim, nano or even gedit.
Step by step how to create hello world java program on lubuntu
- open terminal/console and type this command to launch leafpad and create a file called HelloWorld.java
leafpad 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("lubuntuhowto.blogspot.com is awesome blog !!");
}
}
javac HelloWorld.java
java HelloWorld
This just a basic simple java application, if you want to learn more about java programming please comment down below whether i should make another blog post about java programming or not.
No comments:
Post a Comment