Home » Java Basics » generics

generics

Generic Method Example in Java

In this example, we will be studying about generic methods and how to use the same in our programmes. Generic method, as the name suggests, is a method that does not specify the Type of its parameters, per se. Rather, it defines a criteria (or a place holder) by which, the method introduces its own type parameters. We will try ...

Read More »

Java Generics Examples

1. Introduction Sun Microsystems included Java Generics in java 1.5 to introduce the type-safety feature while using the collection classes. It also complements auto-boxing, auto-unboxing, bounded variables, covariance, etc. There are other benefits of Generics. We will uncover each. 2. What is Java Generics Java Generics is a technical term denoting a set of language features related to the definition and ...

Read More »