这个课程的参考视频在youtube。
主要学到的知识点有:
- set up needs Java SE JDK, NetBeans IDE
- class name should be the same like .java file name.
- .java is java file, .jar is compiled code.
- "clean and build" did clean old .jar file and create a new .jar file.
- For keyboard input, need to "import java.util.Scanner;" then use "Scanner input = new Scanner(System.in); " define a new Scanner input, and then use "String name = input.nextLine();" to pass the next input to "name"
- System.out.print(String s) will just print s and have no new line after that.
- System.out.println(String s) will print s and have a new line after that.
- System.out.printf() is similar to printf in C. e.g. "System.out.printf("Hello, %s! ", name);"
- Basic main function: "public static void main(String[] args){ }"