hi guys,
I have been reading this book (
SCJP Sun Certified Programmer for
Java 6 Study Guide (Exam 310-065) by Bates & Sierra reprint edition 2009.
I will be appearing for the exam maybe on 10th of February 2010, yet i have to cover the collections and
thread chapters.
I didn't really understand the marking system as well the number of marks allotted to each chapter. Are all the chapter's equally important or some chapters will have more questions than others ?
besides there are question have have more than one correct choice. for example if in a question there is two correct choice and i figure only one, does that mean i will get half marks for that questions or the question is considered totally wrong.
If anyone can tell me the difference between (==) and .equals() method.
does .equals() check for object type as well as for the values?
when i say ,
String s1 = "hi";
String s2 = new String("hi");
System.out.println(s1==s2); //outputs: false
System.out.println(s1.equals(s2)); //outputs: true
i know that s1 is stored in string constant pool and s2 is an object stored in memory, but the values are same, i mean this two methods are confusing me a bit, just wanna know which one focuses on object type and which one on value or both.
regards,