0% found this document useful (0 votes)
49 views1 page

Eclipse IDE Installation (Continuation)

The document discusses steps for creating and running a Java project in Eclipse IDE. It explains how to create a new Java project, add a class with a main method, write a sample print statement, and execute the program. It also provides an overview of key Java concepts like classes, the main method, statements, and methods. Finally, it describes some examples of compiler errors like missing semicolons or incorrect casing that result from syntax mistakes in the Java code.

Uploaded by

ksnsatish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views1 page

Eclipse IDE Installation (Continuation)

The document discusses steps for creating and running a Java project in Eclipse IDE. It explains how to create a new Java project, add a class with a main method, write a sample print statement, and execute the program. It also provides an overview of key Java concepts like classes, the main method, statements, and methods. Finally, it describes some examples of compiler errors like missing semicolons or incorrect casing that result from syntax mistakes in the Java code.

Uploaded by

ksnsatish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Eclipse IDE Installation (Continuation)

Double Click the Application file to launch Eclipse IDE and specify Workspace path
Pin the Application file to the Task Bar

Java Project Creation & Execution

The below are the steps for creating a Java Project in Eclipse IDE:

Right click in the 'Project Explorer' and select 'New > Project > Java Project'
Provide 'Project Name' and click on 'Finish' button
Right click on the 'src' folder and select 'New > Class'
Provide 'Class Name', select the checkbox for main method and click on 'Finish' button
Write a sample Java statement - System.out.println("Hello World!");
Right click on the .java file and select 'Run As > Java Application' to execute the Java program

Understanding Java Programs

In Java programs, we have to enclose everything inside a Class.


Syntax: public class ClassName {          }
This class term is used as syntax to create/define a Class in Java
In Java programs, execution starts from the main method
Syntax of main() method - public static void main(String args[]){   }
All the Java statements in Java should end with ';' symbol
Example for a Java Statement is nothing but print statement - System.out.println("Hello World");
All the Java statements should be written inside the methods
We generally write code which is nothing but a set of statements inside the methods
Keywords like public, static, void and String args[] will be explained later

Compiler Errors

Java Complier Errors will be displayed when we make syntax mistakes in the Java Code:

Example: All the Java statements in Java should end with ';' symbol
Remove the ; from the end of Java Statement
Example: Java is case sensitive
Replace 'S' with 's' in the statement
Example: Remove any of the closing brace

You might also like