What is Java Generics?

Java 8Object Oriented ProgrammingProgramming

Java Generic methods and generic classes enable programmers to specify, with a single method declaration, a set of related methods, or with a single class declaration, a set of related types, respectively.

Generics also provide compile-time type safety that allows programmers to catch invalid types at compile time.

raja
Published on 06-Feb-2018 00:58:51
Advertisements