View RSS Feed

Advanced Java

Advanced Java programming.

  1. What is Java Generics?

    by , 02-18-2012 at 04:32 PM
    Java provides support to the Generic features of JV. For specification of the concrete types to certain general methods or classes, Generics is used.

    Above given definition is an abstract definition. For better understanding, consider few examples.
    Object instances are stored by the help of List interface. Therefore one can do storage and also place objects in a List. E.g.

    Java Code:
    List list = new ArrayList();
    list.add(new Integer(2));
    list.add("String");
    ...
    Categories
    Generics