How to get simple output from Java project

 Previously We created Java project. If you missed it, you can read it using following link.

https://easytrickscreation.blogspot.com/2022/09/java%20first%20create%20project%20.html

Now Expand your project like this, click on "src" and choose "class" 




give name and click "finish" button.


now you can see your class like this.


type this code 

                public static void main(String[] args) {
System.out.print("Hello Developers");
System.out.println("Hello java Developers");
System.out.print("Good morning Developers");
}


After you should save this using ctrl+s 
Now you can run your application 
 
Right click on the class and select "run" and click "run AS" and select "java application"


See now to can see our first project output


in this you can see difference between "println" vs "print"

println : new line

print : without new line

Post a Comment

Previous Post Next Post

Contact Form