Skip to content

Tag Archives: Java-Generics

Templates are the foundation of generic programming, which involve writing code in a way that is independent of any particular type. These powerful tools can… Read More
Generics make a class, interface and, method, consider all (reference) types that are given dynamically as parameters. This ensures type safety. Generic class parameters are… Read More
Generic means parameterized types introduced in java5. These help in creating classes, interfaces, methods, etc. A class or method which works on parameterized type known… Read More
Java Arrays store items in an ordered collection and the values can be accessed using the index(an integer). Whereas HashMap stores as a Key/ Value… Read More
The Set interface is present in java.util package. It is basically a collection of objects with no duplicate objects that means there can be no… Read More
Java Generics was introduced to deal with type-safe objects. It makes the code stable.Java Generics methods and classes, enables programmer with a single method declaration,… Read More
When we know that we have to iterate over a whole set or list, then we can use Generic For Loop. Java’s Generic has a… Read More
Generics mean parameterized types. The idea is to allow type (Integer, String, … etc, and user-defined types) to be a parameter to methods, classes, and… Read More