Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.8K+ articles
DSA
20.1K+ articles
Python
20.0K+ articles
Experiences
15.9K+ articles
Java
9.6K+ articles
Misc
8.2K+ articles
java-interfaces
78+ articles
Java-Constructors
36+ articles
C++-Templates
14+ articles
Java-Competitive-Programming
9+ articles
Java-Generics
11 posts
Recent Articles
Popular Articles
Templates in C++ vs Generics in Java
Last Updated: 28 May 2025
While building large-scale projects, we need the code to be compatible with any kind of data which is provided to it. That is the place where your written code stands abov...
read more
Java
C++-Templates
Java-Generics
Generic Class in Java
Last Updated: 19 July 2023
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 declaratio...
read more
Misc
Java
Java-Generics
Generic For Loop in Java
Last Updated: 07 December 2022
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 new loop called for-each loop. It is also called enha...
read more
Misc
Java
Java-Generics
Generic Map In Java
Last Updated: 29 October 2020
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 pair. Using HashMap, we...
read more
Java
Java-Generics
Generic Set In Java
Last Updated: 24 October 2020
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 two objects in a Set e1 and...
read more
Misc
Java
Java-Generics
Generic Constructors and Interfaces in Java
Last Updated: 28 January 2021
Generics make a class, interface and, method, consider all (reference) types that are given dynamically as parameters. This ensures type safety. Generic class parameters a...
read more
Java
Java-Constructors
java-interfaces
Java-Generics
Generic Class Hierarchies in Java
Last Updated: 17 May 2021
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
Technical Scripter
Technical Scripter 2020
Java-Generics
Java Generics to Code Efficiently in Competitive Programming
Last Updated: 10 May 2022
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 be used for w...
read more
Java
Java-Generics
Java-Competitive-Programming
Type-Safety and Type-Casting in Java Generics
Last Updated: 07 June 2023
Generics means parameterized types. The idea is to allow type (Integer, String, … etc., and user-defined types) to be a parameter to methods, classes, and interfaces. It i...
read more
Java
Java-Generics
Restrictions on Generics in Java
Last Updated: 14 May 2023
In Java, Generics are the parameterized types that allow us to create classes, interfaces, and methods in which the type of data they are dealing with will be specified as...
read more
Java
Java-Generics
Generics in Java
Last Updated: 18 April 2025
Generics means parameterized types. The idea is to allow a type (like Integer, String, etc., or user-defined types) to be a parameter to methods, classes, and interfaces. ...
read more
Java
Java-Generics
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !