Another frequently asked Java collection interview question post Java 5 world which introduced Concurrent Collection classes likeConcurrentHashMapandCopyOnWriteArrayListalong with Concurrency utilities e.g.CyclicBarrierandCountDownLatch. Well both Hashtable andConcurrentHashMapare thread-safe here but later provid...
This question is themost importantand is most likely to be asked at every job interview level. You must be very clear on this topic., not only because it is the most asked question but also it will open up your mind to further questions related to Collection APIs. The answer to this q...
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...
Difference between Vector and Arraylist is the most common Core Java Interview question you will come across in Collection . This question is mostly used as a start up question by the Interviewers before testing deep roots of the Collection . Vector , ArrayList classes are implemented using dynamic...
1.JDBC Interview Questions and Answers 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 ...
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. ...
ArrayList is an ordered Collection of objects, the objects will be in the same order that you use to add them to the ArrayList.HashTable is a Collection of Key Value Pair. Each object in the HashTable is defined by a Key and Value....
可以使用 Collections. unmodifiableCollection(Collection c) 方法来创建一个只读集合,这样改变集合的任何操作都会抛出 Java. lang. UnsupportedOperationException异常。 示例代码如下: package com.ph.Interview; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util....
1、今天斩获今日头条 实习offer 特来分享 2、WAP onsite interview面经 3、BAT面经,暑假前趁热来一发...
Miscellaneous: Java Basics, Garbage Collection, Threading, ExceptionsSample Java Test QuestionWhich of the following Java classes effectively prevent other classes from modifying their internal data? (Check all that apply.)Note that for the purposes of this question, neither reflection nor bytecode mani...