Explain the difference between arraylist and linkedlist in java?
Answer / Bhupender Singh Bisht
ArrayList is a resizable-array implementation of the List interface. It provides fast access to elements at any index, but inserting and deleting elements may be slow for large lists because it requires shifting elements. LinkedList, on the other hand, is a doubly-linked list implementation of the List interface. It allows fast insertion and deletion at the beginning or end of the list, but accessing elements by index can be slower than ArrayList.
| Is This Answer Correct ? | 0 Yes | 0 No |
Can an interface have a class?
Is it possible for yielded thread to get chance for its execution again ?
What is a data structure java?
Can static method access instance variables ?
What is meant by throwing an Exception?
Wha is the output from system.out.println(“hello”+null); ?
Which is easier .net or java?
What is widening and narrowing in java? Discuss with an example.
What is an interface in java?
When should I use singleton pattern?
What is the function of http?
Why do we need hashmap in java?