[Java in NetBeans] Lesson 11. While Loops】的更多相关文章

这个课程的参考视频和图片来自youtube. 主要学到的知识点有:(the same use in C/C++) 1. while loop while(i < max){} will keep executing if i < max is true, otherwise will jump out from the while loop. Possible execute 0 times. max = 5;i = 0; while(i < 5){System.out.printf(&…
这个课程的参考视频和图片来自youtube. 主要学到的知识点有:(the same use in C/C++) 1. x++, x += 1; similar x--, x -= 1; x *= 2; x /= 2. x++ : Plus 1 after  the line is executed. similar x-- x = 2; System.out.printf(" x is now : %d", x++); System.out.printf(" x is :…
这个课程的参考视频和图片来自youtube. 主要学到的知识点有: 1. organize code into packages Create a package if want to make the jar file reusable for other projects too. 2. JavaDocs- document the code In NetBeans Shortcut : /**  == generate JavaDoc for method /** * Print the…
这个课程的参考视频在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 keyboar…
这个课程的参考视频和图片来自youtube. 主要学到的知识点有: We want to handle the bad Error. (e.g bad input / bugs in program) 1. File() : A Java representation of a file. File file = new File("test.txt"); 2. PrintWriter() : Write to a file. Write string into the file. /…
这个课程的参考视频和图片来自youtube. 主要学到的知识点有: We want to handle the bad Error. (e.g bad input / bugs in program) Error: a type of Exception   e.g   File I/O;   User Input, out of control. An example that handle the wrong input and out of range input. 1. First we…
这个课程的参考视频和图片来自youtube. 主要学到的知识点有: Build in functions in java.util.Collections Need to implement a comparator - a special class which returns an integer comparision of two object, if  compare(a,b), if return negative number, a will be before b, otherw…
这个课程的参考视频和图片来自youtube. 主要学到的知识点有: 1. Nested If-else statement (if-else ladder) /** * 90 and above ==> A * 80 up to 90 ==> B * 70 up to 80 ==> C * 60 up to 70 ==> D * below 60 ==> F */ if (grade >= 90) { gradeLetter = "A"; } els…
这个课程的参考视频和图片来自youtube. 主要学到的知识点有: Constructors: A special method called when an object of the class is created property pattern and encapsulation(封装): hide the implementation details from the user, so when the class is been inherited, only the method…
这个课程的参考视频和图片来自youtube. 主要学到的知识点有: Define a method:(motivation: write one time, but use it many times) Access: public, private, protected public: Any other class can access a public field or method. (Further, other classes can modify public fields unl…