[Java in NetBeans] Lesson 00. Getting Set-up for Learning Java

时间:2022-03-25 17:47:44

这个课程的参考视频在youtube

主要学到的知识点有:

  1. set up needs Java SE JDK, NetBeans IDE
  2. class name should be the same like .java file name.
  3. .java is java file, .jar is compiled code.
  4. "clean and build" did clean old .jar file and create a new .jar file.
  5. 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"
  6. System.out.print(String s) will just print s and have no new line after that.
  7. System.out.println(String s) will print s and have a new line after that.
  8. System.out.printf() is similar to printf in C.  e.g.  "System.out.printf("Hello, %s! ", name);"
  9. Basic main function: "public static void main(String[] args){ }"