Search Interview Questions
| More than 3000 questions in repository.|
There are more than 900 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Core java - Interview Questions and Answers for 'Fja-us' - 1 question(s) found - Order By Newest|
|Ans. Both Arrays and ArrayLists are used to store elements. Elements can be either primitives or objects in case of Arrays, but only objects can be stored in Arraylist. Array is a fixed length data structure while arraylist is variable length collection class. Once created, you cannot change the size of the arrays, but arraylists can dynamically resize itself when needed.Another notable difference between Arrays and Arrayslist is that arary is part of core java programming and array list is part of collection classes|
Sample Code for arrays arraylist
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  array  arraylist  array vs arraylist Asked in 7 Companies basic   frequent|
|What is the difference between ArrayList and LinkedList ?|
|If you are given a choice to use either ArrayList and LinkedList, Which one would you use and Why ?|
|Will this code give error if i try to add two heterogeneous elements in the arraylist. ? and Why ?|
|Difference between Vector and ArrayList ?|
|Difference between ArrayList and LinkedList ?|
|What is meant by "Vector is synchronized and ArrayList isn't " ?|
| Is this Polymorphism ?|
Map<String, List<String>> inventoryManagerCountMap = new HashMap<String, ArrayList<String>>();
|What is CopyOnWriteArrayList ?|
|What are the advantages and disadvantages of CopyOnWriteArrayList ?|