[Java in NetBeans] Lesson 12. Arrays】的更多相关文章

这个课程的参考视频和图片来自youtube. 主要学到的知识点有: 1. Array: container that holds a fixed number of values of the same type, can be access by index. Create a string array and initialize the elements one by one. Index will be start from 0 to size -1. String[] names =…
这个课程的参考视频和图片来自youtube. 主要学到的知识点有: 1. Multidimensional Array: Array that has more than one dimension. Create a array with two dimensions. char[][] board = new char[3][3]; // tic-tac-toe board board[0][0] = 'X'; // place an X in upper-left board[1][2]…
这个课程的参考视频和图片来自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…