Duration: 16:31 minutes
Summary: In this video, we continue the second set of exam questions. As we recall from the previous set, the questions are at random. The first question we tackle in this video has to do with string references. We create strings and pass them as parameters to methods. These strings are manipulated somehow. We are asked for the values printed for these strings. The way to approach those questions is by drawing on the piece of paper the string objects and their references. By keeping track of these values, we can tell the final content of the string. In other questions, we are asked the list of classes that take strings as parameters in their constructors. These are hard questions to answer because it is either you know it or you don’t. There is no way for you to analyze the code and decide. One question we look at has to do with TreeSets. Some of them use generics. Others don’t. Our job is to determine which one causes an exception at runtime and which one would not compile.