View RSS Feed

Recent Blogs Posts

  1. Generic Classes in Java

    by , 02-18-2012 at 04:52 PM
    Your Java classes could also be generified. Generics are not restricted or bound to any pre-defined classes of Java. This is also applicable to customized written classes of Java.

    Simple generic class is explained here by this code.
    Java Code: This is the code to explain generic class
    public class GenericTestFactory<E> {
        Class myClass = null;
        public GenericTestFactory(Class myClass) {
            this.myClass = myClass;
        public E createInstance()