What is the need of Collection framework in Java since all the data operations(sorting/adding/deleting) are possible with Arrays and moreover array is suitable for memory consumption and performance is also better compared with Collections.
Can anyone point me a real time data oriented example which shows the difference in both(array/Collections) of these implementations.
Vectorbut cooler), red-black trees, hash-based maps (likeHashtablebut cooler).List, whether backed by an array list or a linked list; and you can refer to a map/dictionary as aMap, whether backed by a red-black tree or a hashtable.In other words, Java Collections Framework allows you to use the right data structure, because one size does not fit all.