For example, some Collection implementations like List allow duplicate elements whereas other implementations like Set don't. A lot of the Collection implementations have a public clone method. However, it doesn't make sense to include it in all implementations of Collection. This is because Collect...
Java Collection Framework interviewquestions and answerscontains questions from popular Java collection classes e.g.HashMap,ArrayList,HashSet,ConcurrentHashMapand legacy collection classes like Vector andHashtable. Interview questions from Java Collection framework is one of the most asked concept on anyCor...
In this article, we discuss interview questions for a Java developer and offer sample answers to help you create effective responses in your interview.
If you are working on Enterprise applications, I am sure that JDBC API is a part of it. JDBC API provides database connectivity for relational databases, such as MySQL and Oracle. This article has a collection of 40+ interview questions related to the JDBC API. They cover areas from basic...
This guide will take us through the Java Collections framework. It will help us understand the core concepts, perform basic operations and introduce important classes. 1. Basics Introduction to Java Collections Collections Interview Questions 2. List Guide to Java List 4. Map Guide to Java Map ...
This question is mostly used as a start up question in Technical interviews on the topic of Collection framework . Answer is explained in detail hereDifference between ArrayList and Vector. 7. How do you handle error condition while writing stored procedure or accessing stored procedure from java?
9) Which collection classes allow NULL? ArrayList, LinkedList, HashSet, HashMap (keys & values) and Hashtable (values only) all allow NULL. The two exceptions are TreeMap and TreeSet. 10) What happens if we add the same key with different values to a HashMap?
1.6.Java Collections Interview Questions Should I recommend you to prepare theCollection frameworkand all of its main classes? I guess you are already intelligent enough. Any interview (junior and mid-level) will be incomplete if there are no questions related to the Collections framework. It trul...
Iterator is an interface which is used to step through the elements of a Collection. 6What is similarities/difference between an Abstract class and Interface? 6.1Similarities 6.1.1They can be used to implement the polymorphism. 6.1.2Both of them can not be instantiated. ...
This data structure is part of Collection framework, introduced in JDK 1.2 This is a legacy class The capacity increment of ArrayList is 50% if the number of elements exceeds the current size The capacity increment of Vector is 100% if the number of elements exceeds the current size It is ...