Out of the 2 books you have mentioned 1st one is for Servlets and Jsp and the 2nd one is for Java. What is the confusion? What do you need the book for?
When i run this program I see that all five Person Objects are added to HashSet. HashSet doesnot add duplicates. Then why is "Hans" and "Jane" added twice to HashSet??
What makes you to think that the two Person Objects should be same only because they have similar names ??? Did you do anything in your Person class to tell the JVM how to test for equality?
Yup SCJP and SCWCD will give you a good platform to start with. Later on depending upon, where your career path leads you and what interests you develop, You can choose the rest.
10 is the initial Capacity of the PriorityQueue. Things like this can be easily clarified by looking at the api docs click Also you have missed an important part in the question, marked load queue
You can go for SCWCD. It will help you transform from a Java application programmer to web based application developer. SCJP and SCWCD can give you a decent start in your job hunt. Mostly people go for SCWCD after SCJP. Having said that, this is just my personal opinion and you being a stranger to me. What you go for and where you land up will depend upon a lot of things which may be subjective in nature. HTH..
Yes it is correct. References can be final. Final references can not be reassigned to anything else once an object is assigned. The state of the object however can change. There is nothing called final object in Java. Also it should be final not Final. [ August 23, 2008: Message edited by: sharad sinha ]
Pradeepta, I think You are refering to chapters 11 and onwards. Even I remember somewhere somebody having a pdf with chapters 1 - 19 or so I dont know which version of K&B. Only chapters 1 - 10 are for SCJP.
options 1 and 2 are correct. what is the problem? You are already inside the directory from where the command is invoked. In the first for loop file2.txt will not be found in dir1 and will be found in dir2. In the second for loop file2.txt is not a file inside dir1 but is a file inside dir2.
Well Sunny, What you are saying is correct. But also think about a situation where class A has a public getter method to get the instance of B. Something like
Now any code which has access to A's same object can get B's object and store the reference to play with it later on, who knows when.