- Primitive - 8 types
- String (3 methods)
- if, else if, else
- for loop + if else
- operator (>, <, >=, <=, ==, !, &&, ||)
- break, continue
- switch - lower priority
- nested loop - lower priority
N/A
- Methods (Static)
- Array (17 types)
- String (> 10 methods) - for loop
- Wrapper Class - 8 classes (Converison)
- for-each loop
- Primitive (Upcast/ Downcast) -> overflow
- While Loop
- ASCII - char/ int
- Pass by reference/ Pass by value (low priority)
- Do-while Loop (low priority)
- Sorting - Bubble, insertion
- String Literal
- Integer Cache
- Stack & Heap memory (object)
- Scanner, Random
-
Instance Method
-
- Belongs to the object (Person p1 = new Person(); p1.swim();)
-
- Able to control the instance variable by "this"
-
-
Static Method
-
- Belongs to the class (ClassName.staticMethod() -> Person.swim(3))
-
- Not able to read/write instance variable
-
- The return value completely derived by the input parameters
-
- extends
- Parent class (Normal Class and Abstract Class). Their Difference
- Make sure you know the limitations of using "extends"
- pros and cons 優點和缺點
- implements
- Interface (100% abstract)
- Make sure you can create, modify, understand impact between class and inter face
- pros and cons 優點和缺點
- Object.class (Parent)
- Object Reference Type vs Object Type
- What if "Object Reference Type" is a parent of "Object Type"?
- Whay if "Object Type" is a parent of "Object Reference Type"?
- Object obj = new ChildClass(); (What are the implications)
- Enum
- DS
- List - ArrayList, LinkedList
- Queue - LinkedList, ArrayDeque
- Set - HashSet
- Map - Hash Map
- Stack, PriorityQueue (less important)
- Hash DS (equals() & hashCode())
- Comparator & Comparable (Interface Control on method parameter - Collections.sort())