Thursday, 10 December 2015

Java hello world in eclipse

Here, i am going to  discuss about very basic java learning blah blah blah...k lets start the hello wold program in java using eclipse.



Java hello world in eclipse
This is the first step :

Open your eclipse click file -> New -> and select Project


Java hello world in eclipse

Step 2:

select the java project...

Java hello world in eclipse

step 3:

now u can see the window ... just give the project name and click finish


Java create class

step 4:

click your project  name ..Oooops right click your project name and again new -> Class


Java create class and packages

Step 5:

Package: yah that is package , I can see that but what is package?

package is  similar to different folders on your computer ...( i can not explain about  folders and computers if you want to know mail me...) 
you can create packages (folders) to write your class , i gave [] com [] in the package name

Name: it's your class name ...give it and click finish


Java hello world



Step 6:

your package and class created ,now type the code... or copy paste it

package com;
public class HelloJavaClassName {
 public static void main(String []args) {
        System.out.println("Hello World");
     }
}


Now press the play button or press  Ctrl + F11 you can see the result in the console window...



Yah ! you run your first java program but
what is public?
what is static?
what is void? 
what is main?
what is String args and what is []?
what is System.out.println();?

try to search on web else wait for the next post.....  






 








 

No comments:

Post a Comment