What is collection in java?

DWQA QuestionsCategory: QuestionsWhat is collection in java?
1 Answers
Editor Staff answered 4 months ago

Collections are like containers that group multiple items in a single unit. For example, a jar of chocolates, list of names, etc.
Collections are used in every programming language and when Java arrived, it also came with few Collection classes – Vector, Stack, Hashtable, Array.