Page 4 of 5
- Next step will be to create HelloWorld.java file. Navigate to File/New/Class.
- On selecting class option you see New Java Class pop-up. Here we will create the HelloWorld.java file with the default package.
- One of the advantage of using IDE as the development tool is it helps you create code skeleton and comments, so you can spend your precious time doing other important things in life like fishing, long drives, dating ,etc.
- Name (Name of the Java File): HelloWorld
- Which method stubs would you like to create: Check "public static void main(String[] args)" option.
- Do you want to add comments?: Check "Generate comments" option.
- Click Finish to create the HelloWorld.java
- Now you have the stub of main method created. You are ready to edit the method as per your needs.
Edit the main method to print "HelloWorld" as shown below.