Order of Initialization
(2)
Identifiers
Local Variables
(3)
Java primitive types
(8)
Keyword - Type - Example
true or false
8-bit integral value 16-bit integral value 32-bit integral value 64-bit integral value
Ordering Elements in a Class
(6)
Garbage Collection
(2)
finalize()
Java allows objects to implement a method called finalize() that might get called. This method gets called if the garbage collector tries to collect the object. If the garbage collector doesn’t run, the method doesn’t get called. If the garbage collector fails to collect the object and tries to run it again later, the method doesn’t get called a second time.
In practice, this means you are highly unlikely to use it in real projects. Luckily, there isn’t much to remember about finalize() for the exam. Just keep in mind that it might not get called and that it de nitely won’t be called twice.
Benefits of Java
(6)