First Java Program
Steps to be follow:
1.Open Eclipse
2.Create new java project- File-->New-->Java Project.
3. Enter the name of the project-->MyfirstJavaCode.
4.Click on Finish Button.
5.Right click on the project name and create new class. New-->Class-->Enter class name as MyfirstJavaCode.
6.Select the check box against "public static void main(String[] args)".
7.Click on Finish button.
8.Now Type " System.out.println("This is my first java program"); ". in java editor.
9.Save the program by pressing ctrl+s.
10. Right click on the program and click on "Run As" further click on " Java Application".
Actual Code:
public class MyfirstJavaCode {
public static void main(String[] args) {
// To print the message we use below mentioned code
System.out.println("This is my first java program");
}
}
Steps to be follow:
1.Open Eclipse
2.Create new java project- File-->New-->Java Project.
3. Enter the name of the project-->MyfirstJavaCode.
4.Click on Finish Button.
5.Right click on the project name and create new class. New-->Class-->Enter class name as MyfirstJavaCode.
6.Select the check box against "public static void main(String[] args)".
7.Click on Finish button.
8.Now Type " System.out.println("This is my first java program"); ". in java editor.
9.Save the program by pressing ctrl+s.
10. Right click on the program and click on "Run As" further click on " Java Application".
Actual Code:
public class MyfirstJavaCode {
public static void main(String[] args) {
// To print the message we use below mentioned code
System.out.println("This is my first java program");
}
}
0 comments:
Post a Comment