learnJava

Lesson 0. Getting Started with Java: Hello World

1. Introduce yourself and tell us why you want to learn programming?

Please answer it on gist Java_01-1 if you have no github account, please create one right now.

2. Why Java?

Please do google research, look into at least 3 results. And answer the question base your understanding at gist Java_01-2

3. What you will learn from this class

4. Found out what is the latest version of Java and how to install it

5 Install Java IDE (Integrated Development Environment)

6 HelloWorld Example

6.1 Hello World example in W3school

6.2 Use BlueJ

6.2 Use VSCode

6.3 Command line Build and run the HelloWorld Sample 1

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

6.4 HelloWorld Sample 2 (multiple files)

    //Hello.java
    package sample2;
    public class Hello {
        public void SayHello() {
        System.out.println("Hello: Hello World!");
        }
    }
    //main
    package sample2;
    import sample2.Hello;
    public class Main {

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

            //call hello in another java file
            Hello hello=new Hello();
            hello.SayHello();
        
        }

    }
    // ./META-INF/MANIFEST.MF
    Manifest-Version: 1.0
    Main-Class: sample2.Main

7 Home Work



Code of this page https://github.com/stoneskin/learnJava/tree/main/00_HelloWorld