Tutorials
Courses
Go Premium
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.1K+ articles
DSA
20.0K+ articles
Python
19.6K+ articles
Experiences
15.8K+ articles
Java
9.3K+ articles
Misc
7.8K+ 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
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
Type-Safety and Type-Casting in Java Generics
Last Updated: 05 August 2025
Java Generics enable you to write code that works with different data types while ensuring type safety at compile time.Type-SafetyArrays in Java are type-safe, meaning the...
read more
Java
Java-Generics
Java Generics to Code Efficiently in Competitive Programming
Last Updated: 23 July 2025
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
Generic Constructors and Interfaces in Java
Last Updated: 04 August 2025
Generics allow classes, interfaces and methods to operate on objects of various types while ensuring type safety. Type parameters are specified in angle brackets () and en...
read more
Java
Java-Constructors
java-interfaces
Java-Generics
Generic Class Hierarchies in Java
Last Updated: 23 July 2025
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
Generic Map In Java
Last Updated: 23 July 2025
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: 23 July 2025
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 Class in Java
Last Updated: 04 August 2025
In Java, Generics provide type-safe, reusable code by allowing parameterized types. They enable classes, interfaces and methods to work with any data type (e.g., Integer, ...
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
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
Generics in Java
Last Updated: 06 August 2025
Generics means parameterized types. They allows us to write code that works with different data types using a single class, interface or method. Instead of creating separa...
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 !