1. Start Eclipse
2. Create a new Java Project
a) File à New à Project
a) Select ‘Java Project’ and Click on ‘Next’.
c) Enter the project name into the project name field.
3. Creating a new Java Package under the Project:
a) Right click on Project nameà New à package
b) Enter package name and Click on ‘Finish’.
4. Creating a new Java Class under the above package:
a) Right click on package name à New à Class
b) Enter Class name à Click on ‘Finish’
This is my first created class. In this, we create a main method and write one line of code.
package firstJavaPkg;
public class HelloProgram {
public static void main(String[] args) {
System.out.println("Hello Program");
}
}
Output: Hello Program
No comments:
Post a Comment