Java is a high level programming language which is used almost everywhere- in Android mobile phones, set top boxes, in Google Maps, video games, etc.
Today let's see how to make the simplest Java program- "Hello, world" in Eclipse.
Step #1. Select your file location where you want to save your work.
Today let's see how to make the simplest Java program- "Hello, world" in Eclipse.
Step #1. Select your file location where you want to save your work.
Step #2. Select File>New>Project as shown in the picture below:
Step #3. Select Java>Java Project>Next as shown below:
Step #4. Enter the project name in Project name as shown below:
Step #5. Select Finish.
Step #6. Select Yes.
Step #7. Double click one the project name.
You will see a folder named as "src" under the the project HelloWorld.
Step #8. Right click on the folder "src">New>Class.
Step #9. Enter the name of the class. Then click on Finish.
Step #10. You will see a screen like this:
Step #11. Write the following code:
public class Hello {
public static void main(String[] args) {
System.out.println("Hello, world!!");
}
}
Step #12. Run the program by clicking on the Run button.
Yay!! Here is the output of your code:
The area shown in the red rectangle is the place where the output of the code is shown.
Congratulation! You have successfully made your first Java program in Eclipse! Feel like a programmer!
Comments
Post a Comment