Hi, a few questions regarding the OCPJP,
1. Suppose i have a TreeSet<MyObject>, does MyObject must implement Comparable? What happens when i try to retireve them?
2. In questions regarding ordering, unless specified otherwise, when the exam say ordered elements mean in "ascending order"?
3. Do both,
java and javac commands ignore the options when stated after the .java or .class respectively? like specifing the -D option at last.
4. StringBuilder doesnt overload equals and hashcode directly form Object? I mean, why
String does and Stringbuilder doesnt since it is a predefined Java class.
5. Does the following statement is true? In some places i see its true some others i read its false.
"If the GC decides to delete an object, and if finalize() has never been invoked for that object, it is guaranteed that the GC will invoke finalize() for that object before the object "
Thanks in advance,
Fernando