Which implementation of the List interface provides for the fastest insertion of a new element into the middle of the list? ,Java, C ,C++, ASP, ASP.net C# ,Struts ,Questions & Answer, Struts2, Ajax, Hibernate, Swing ,JSP , Servlet, J2EE ,Core Java ,Stping, VC++, HTML, DHTML, JAVASCRIPT, VB ,CSS, interview ,questions, and answers, for,experienced, and fresher
Which implementation of the List interface provides for the fastest insertion of a new element into the middle of the list?

> Vector

> ArrayList

> LinkedList

>  None of the above

                ArrayList and Vector both use an array to store the elements of the list. When an element is inserted into the middle of the list the elements that follow the insertion point must be shifted to make room for the new element. The LinkedList is implemented using a doubly linked list; an insertion requires only the updating of the links at the point of insertion. Therefore, the LinkedList allows for fast insertions and deletions

More interview questions and answers

Which containers may have a menu bar?

Which class is the immediate supar class of the menuComponent class?

How you define Comparison and Logical Operators?

What is the relationship b/w the Canvas class and the Graphics Class?

How are the elements of a borderLayout organized?

How are the elements of a GridBagLayout organized?

How to use Conditional Statements in JavaScript?

Difference b/w paint() and paintComponent()?

Give us the Name of the List LayoutManagers in Java?

How you define Popup Boxes in JavaScript?

How we use functions in JavaScript?

How to define function in JavaScript?

What is the Collections API?

What is the List interface?

What is the Vector class?

What is an Iterator interface?

Which java.util classes and interfaces support event handling?

What is the GregorianCalendar class?

What is the Local class?

What is the SimpleTimeZone class?

What is the Map interface?

What is the highest-level event class of the event-delegation model?

What is the Collection interface?

What is the Set interface?

What is the typical use of Hashtable?

We trying to store an object using a key in a Hashtable. And some other object already exists in that location, then what will happen? The existing object will be overwritten? Or the new object will be stored elsewhere?

What is the difference between the size and capacity of a Vector?

Can a vector contain heterogenous objects?

What is the Lifetime of JavaScript variables?

Can a ArrayList contain heterogenous objects?

What is an enumeration?

Considering the basic properties of Vector and ArrayList, where will you use Vector and where will you use ArrayList?

How we use Loop in JavaScript?

How we use Break and Continue Statement in JavaScript?

How you define for..in statement in JavaScript?

How you define Events in JavaScript?

How you use try..catch statement in JavaScrpt?

How to use throw statement in JavaScript?

What is HashMap and Map?

What is the significance of ListIterator?

What is the difference b/w Iterator and ListIterator?

Difference between HashMap and HashTable?

What is the difference between set and list?

Difference between Vector and ArrayList? What is the Vector class?

What is an Iterator interface? Is Iterator a Class or Interface? What is its use?

How can we access elements of a collection?

What is the Set interface?

What is the difference between a queue and a stack?

What is the Map interface ?

What is the Properties class?

Which implementation of the List interface provides for the fastest insertion of a new element into the middle of the list?

How can we use hashset in collection interface?

What are differences between Enumeration, ArrayList, Hashtable and Collections and Collection?

What is difference between array & arraylist?

Can you limit the initial capacity of vector in java?

What method should the key class of Hashmap override?

What is the difference between Enumeration and Iterator?

Explain Java Collections Framework?

Explain Enumeration Interface.

What is the difference between Enumeration and Iterator interface?

What are the two types of Set implementations available in the Collections Framework?

What is the difference between HashSet and TreeSet?

What are the two types of List implementations available in the Collections Framework?

What is the difference between ArrayList and LinkedList?

What collection will you use to implement a queue?

Explain Map Interface.

What are the two types of Map implementations available in the Collections Framework?

What is the difference between HashMap and TreeMap?

Explain the functionality of Vector Class?

What does the following statement convey? Vector vt = new Vector(3, 10);

How do we store a primitive data type within a Vector or other collections class?

What is the difference between Vector and ArrayList?

How do I make an array larger?

Which is faster, synchronizing a HashMap or using a Hashtable for thread-safe access?

In which package would you find the interfaces amd claases defined in the Java Collection Framework

What method in the System class allows you to copy eleemnts from one array to another?

When using the System.arraycopy() method,What exception is thrown if the destination array is smaller than the souce array?

What is the use of GregorianCalendar class?

What is the use of SimpleTimeZone class?

What is the use of ResourceBundle class

Which java.util classes and interfaces support event handling?

What is the purpose of the enableEvents() method?

What is the difference between yielding and sleeping?

When a thread blocks on I/O, what state does it enter?

When a thread is created and started, what is its initial state?

What invokes a thread�s run() method?

What invokes a thread�=s run() method?

What method is invoked to cause an object to begin executing as a separate thread?

What is the purpose of the wait(), notify(), and notifyAll() methods?

What happens when a thread cannot acquire a lock on an object

How does multithreading take place on a computer with a single CPU?

What happens when you invoke a threads interrupt method while it is sleeping or waiting?

What state is a thread in when it is executing?

What are three ways in which a thread can enter the waiting state?

What method must be implemented by all threads?

What are the two basic ways in which classes that can be run as threads may be defined?

How can you store international / Unicode characters into a cookie?

How to use Special Characters in JavaScript?

JavaScript is an Object Oriented Programming language or not?

How to use Methods in JavaScript?

R4R provides free online tutolrails ,examples for Freshers and experts .We cover core java, tutorials, spring, Hibernate, python, struts, struts 2,c language, spring boot,PHP,MYSQL,C#,ASP.NET,WPF,WCF,Photoshop , JSP, programming, example, Interview questions and answer