In this article, I am going to explain to you how to write simple java program, before writing your first java program you need to setup java environnment on your local machine, if you are not already set up then I would recommend you first check this article on how to set up JDK 8 and Java
Once, the Java environment is ready then writing simple java program is very is easy and it won’t take more than 2mins here, I am going to write a simple java program which prints text on the console that is “Welcome to java world”
Step 1: Create java program
You can either use eclipse or notepad to create a class, here, I am using notepad to create my first class, you can create a new notepad file and add below code, make sure to save it as JavaWorld.java
System.out.println("Welcome to java world");
Step 2: Compile java class
Once the file is saved then run the below command to compile the class, after compilation in your local folder you should see JavaWorld.class file which is byte code of your class
A technology enthusiast and a professional blogger from India. Through out my IT career, I have had the pleasure of working on various new technologies and built products like www.ziprides.com and some other products. Unfortunately, my attempts have not given me the desired results and as a result, I have finally decided to build a professional blog where I would like to share all my learnings and hoping to learn from other enthusiasts around the world.