Java Collection Framework Question and Answers

17. Why we override equals() method?
  The equals() method is used to check whether two objects are same or not. It needs to be overridden if we want to check the objects based on property.
 
Your Name Your Email-ID
Your Answer
18. What is the advantage of properties file?
 
  • If you change the value in properties file, you don't need to recompile the java class.
  • So, it makes the application easy to manage.
 
Your Name Your Email-ID
Your Answer
19. java.util.regex consists of which classes?
  java.util.regex consists of three classes: Pattern class, matcher class and PatternSyntaxException class.
 
Your Name Your Email-ID
Your Answer
20. How do you remove element during Iteration?
  Iterator also has a method remove() when remove is called, the current element in the iteration is deleted.
 
Your Name Your Email-ID
Your Answer
12345 Page 5 of 5