torstai 17. lokakuuta 2013

Java - Hello World with Eclipse Quickly

Open Eclipse and create new "Java Project"
Give a name for your project

Click Finish

Create new class inside src folder

Write "main" inside hello and press CTRL + SPACE and ENTER to autocomplete

public class Hello {
    main 
}


public class Hello {
    public static void main(String[] args) {
       }
 }

write "syso" and press CTRL + SPACE
then add print text


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



 It prints Hello World! to Console.

TIPS: to install JDK on Linux:  sudo apt-get install openjdk-7-jdk

Ei kommentteja:

Lähetä kommentti