├── .gitignore ├── HelloWorld.java └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | 3 | -------------------------------------------------------------------------------- /HelloWorld.java: -------------------------------------------------------------------------------- 1 | public class HelloWorld { 2 | public static void main(String[] args) { 3 | System.out.println("Hello world!"); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Hello world with Java :coffee: 2 | 3 | This is a simple **"Hello world"** done with **Java** programming language. 4 | 5 | ## Source code 6 | 7 | This is the source code of the program: 8 | 9 | ```java 10 | public class HelloWorld { 11 | public static void main(String[] args) { 12 | System.out.println("Hello world!"); 13 | } 14 | } 15 | ``` 16 | 17 | Notice that `System.out.println("Hello world!");` shows the string `"Hello world!"` on the screen. 18 | 19 | ## Compile program 20 | 21 | To compile the "Hello World" program, type the following: 22 | 23 | ```console 24 | javac HelloWorld.java 25 | ``` 26 | 27 | ## Excute the program 28 | 29 | To execute the program, type this: 30 | 31 | ```console 32 | java HelloWorld 33 | ``` 34 | 35 | --------------------------------------------------------------------------------