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 'Collection classes' - 5 question(s) found - Order By Newest | ||||
| ||||
Ans. Collections in java is a framework of classes that provides an abstracted data structure to store and manipulate the group of objects. Each class is unique in the way it stores , search , sort and modify the elements. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  collections  collection classes Asked in 1 Companies Basic   frequent | ||||
| ||||
Ans. No, As collection classes involve use of Generics, they cannot accept primitive types. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  collection classes  collections | ||||
| ||||
This question is still unanswered. Can you please provide an answer. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  concurrent collection classes   fail fast   fail-fast  collections  collection classes expert | ||||
| ||||
Ans. ArrayList is a variable length collection class whereas arrays are fixed length primitive structure. We can use generics with arraylist but not with arrays. We can store primitive data types within arrays but can't with ArrayList. In ArrayList that needs to be converted to Wrapper objects. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  arraylist  arrays  collection classes  collections basic   frequent | ||||
| ||||
Ans. data under collection are actually stored in memory so that they can be retrieved when needed whereas data in streams are not stored and hence we need to construct it again when needed. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  collection classes  stream api  collection vs stream Asked in 1 Companies | ||||