where exactly collections are usefull in realtime

Answer Posted / suresh

collections are the advanced concept to maintain dynamic data as objects. In real time some times we can't estimate the size of the data and type of the data.so it's better to maintain data as objects through collections.through arrays we can't manage the data because arrays are not auto-grow-able in size.
through collections we can use our required data structures directly. we have different classes for that. in each we have predefined methods to manipulate data in that collection.
Collections are performance wise slow. even though collections provide more features to maintain huge data easily.

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between error and exception

4997


What is the best definition for data?

513


What is the role of garbage collector in java?

485


When is the finally clause of a try-catch-finally statement executed?

495


What is a generic type?

553






Can there be an abstract method without an abstract class?

531


What is tree in java?

484


How does compareto method work?

520


What are the object and class classes used for?

550


How does thread synchronization occurs inside a monitor?

542


Are arrays dynamic in java?

529


How many bytes is a string java?

524


what do you mean by classloader?

545


Can we nested try statements in java?

618


Explain Basics of OOP Language in java

584