Duration: 17:06 minutes
Summary: In this video, we continue with the second exam set of questions. We start with a question that is not directly needed for Java 6, but still an important concept. We need to know that we do not have control on when the garbage collector will run and how many times it runs. If we implement the finalize method and call it, it doesn’t mean the JVM will not call it. Then we move into an important concept we discussed many times previously: Comparable and Comparator interfaces. We need to know that the Comparable interface has the compareTo() method that takes a single object argument (that we cast to the appropriate type), and the interface Comparator has the compare() method that takes two object arguments that we cast to the appropriate type as well before comparing the objects in order for them to be sorted. For the third question, remember that polymorphism applies to the instance methods, not the static ones. The final question tackles JAR files.