sharad sinha

Greenhorn
+ Follow
since Jul 13, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sharad sinha

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?
Congrats!!!
Whats next?
15 years ago
Congrats!!!
How much did you score? Whats next?
15 years ago
Congratulations..
15 years ago
Congratulations.. 95% is cool.


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?
After clearing SCJP, You can directly go for SCWCD and others.
Check here
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

HTH.
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..
Although your JSP has errors which needs to be corrected. But the following line makes it confusing


Some times i get the old result and sometimes the follwoing error :-


The problem should be reported consistently by the container. Try clearing the tomcat cache. I think It should be at work/Catalina/
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 ]
15 years ago
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.