answersLogoWhite

0

Generic collections were introduced in Java 1.5 and since then have become preferable to non-generic collections. A non-generic collection defaults to being a collection of Objects, and in order to effectively use those Objects, you need to cast them as their correct data type during use. A generic collection knows what type of object it contains, and thus no casting is needed.

User Avatar

Wiki User

17y ago

What else can I help you with?

Related Questions

What does generic class mean in java?

Generic


What is the purposes of generics in Java programming?

Generics are a part of generic programming within Java. They are commonly used to hold objects of any type, within a Java Collection Framework (JCF), and are a reusable data collection tool.


What is difference between java 2 and java 5?

They are different versions. Java 5 is newer than Java 2. Think of it like the difference between the Playstation 1 and the Playstation 3.


What is the difference between environment and platform?

It's just like 'Java Class, and 'Class Room'. In a 'Java Class', the faculty have to teach only java related topics. And the students in the class must belongs to 'Java' subject. Means it is specific for 'Java' only.i.e., A Platform is a specific one where all the functionality are predefined. Where as, a 'Class Room' is a Generic one where java/.net/php/flex, N-number of classes can be conducted. Like wise, an Environment is a generic one where the needs for platform is provided.


Major difference between c and java?

Java is object oriented, C is not...


What is the difference between connectivity in java?

kamina


What is difference between connectivity in java?

kamina


What is the main difference between UNIX and JAVA?

Unix is an operating system, Java is a language.


Difference between recordset and resultset in java?

Rowset


What is the difference between JAD and JAR?

JAD-Java Application Description JAR-Java archive


What is the difference between java and object oriented programming?

java is a programming language/platform that embodies object oriented programming concepts. The question of what is the difference is like asking what is the difference between cars and a Volvo.


What difference between InputStreamReader and DatainputStream in java?

Both are same