Generics Java Tutorial

The main difference between arrays and data structures is array accepts only one type of data and data structure accepts elements of dissimilar data types. See the following code of ArrayList accepting dissimilar data type values. import java.util.ArrayList; import java.util.Date; public class Demo { public static void main( String args[]) { ArrayList al = new …

Generics Java Tutorial Read More »