In HashSet duplicates are allowed while adding to the HashSet,
but while retreiving the object from HashSet is not shown the
duplicate values, WHY ?
Answers were Sorted based on User's Feedback
Answer / brijendra kumar (xavient)
Actually in HashSet we are able to add the duplicate value,
but at the execution time JVM ignore the duplicate value.
HashSet<String> T= new HashSet<String>();
when we execute these line of code then we got the size of
HashSet is 1.
Due to this reason we are unable to iterate the duplicate
value from HashSet.
|Is This Answer Correct ?||7 Yes||2 No|
Answer / shashi
Because HashSet class will override equals and hashcode method internally.
|Is This Answer Correct ?||0 Yes||0 No|
"Sun Certified Java Programmer" This is one String , we need to print SCJP, write the java code dynamically? pls reply this questions
my interviewer asked me what technical specification you used how to answer that question
What are the classes in the java collection framework? : java collections
what are callback methods?
how to deploy the web application ?
Should we create system software ( e.g operating system ) in java ?
How to use ANT?
I have include a jsp page by using <jsp:include page="/.../xyz.jsp"/> The thing is that the xyz.jsp page has its submit button.When i click on that button the whole main page get refreshed.But i want to refresh only the xyz.jsp page.How could i achive it so that i can only refresh the xyz.jsp not the main page page?
what is difference between vector and arraylist?.
What is an Ioc pattern? There are assemblies in .net for establishing this task, Whats the special in Java /j2ee technologies about IOC
what is the difference between through and throws?
what is filter ?