Search Interview Questions
| 3356 questions in repository.|
There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Java - Interview Questions and Answers|
|Ans. FRIDAY , SATURDAY and WEDNESDAY will be printed but the order cannot be determined.|
Only one FRIDAY will be printed as Set doesn't allow duplicates. Order cannot be determined as HashSet doesn't maintain elements in a particular order.
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  java   code   coding   enum   set   hashset|
Try 3 Question(s) Test
| Collections.sort can only be performed on ..|
d. Any Collection implementation
| What is the difference between List, Set and Map ?|
What are the different Java Collections Interfaces ?
| Why are Getter and Setter better than directly changing and retrieving fields ?|
What is the significance of variable hiding in Java ?
Why it's preferred to keep variables private and allow their access through getter and setter methods ?
|In what order the elements of a HashSet are retrieved ?|
|Which of the following doesn't extend Collection interface ?|
|Difference beween HashSet and TreeSet ?|
|How to display and set the Class path in Unix ?|
|What is comparator interface used for ?|
|If I try to add Enum constants to a TreeSet, What sorting order will it use ?|
|How should we ignore or avoid executing set of tests ?|