25+ Advanced Java Collections Interview Questions 2020-2021 - 1
What is the difference between enumeration and iterator interface?
Enumeration is twice as fast as Iterator and uses very less memory. Enumeration is very basic and fits to basic needs. But Iterator is much safer as compared to Enumeration because it always denies other threads to modify the collection objects which is being iterated by it.
Iterator takes the place of Enumeration in the Java Collections Framework. Iterators allow the caller to remove elements from the underlying collection that is not possible with Enumeration. Iterator method names have been improved to make its functionality clear.
java.util.regex consists of which classes?
java.util.regex consists of three classes: Pattern class, matcher class and PatternSyntaxException class.
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.
What is the vector class?
- The vector class implements an incremental array of objects.
- The vector components can be accessed using an integer index.
- The size of a Vector increases or decreases as needed to accommodate the items.
What is hash collision in hash table and how it is handled in java?
Two different keys with the same hash value is known as hash collision.
Two different entries will be kept in a single hash bucket to avoid the collision.
7000+ Computer Networking MCQ Questions and Answers Pdf More
7000+ Microsoft Office Practical Questions and Answers Pdf More
7000+ Microsoft Office MCQ Questions and Answers Pdf More
7000+ Microsoft Office Quiz Questions and Answers Pdf More
7000+ Cyber Security Quiz Questions and Answers Pdf More
100+ Statement and Assumption Questions for Bank Exams More
C++ Classes Quiz Questions and Answers More
1000+ Mechanism and Machines MCQ Questions & Answers Pdf More
1000+ IBPS Verbal Reasoning Questions and Answers Pdf More
TNPSC Group 2 Previous Year Question Papers with Answers More