package com.example.generic;

/*
 * This is a simple generic class.
 * Here, T is a type parameter that will be replaced by
 * a real data type when object of type Gen is created.
 */
public class Gen<T> {

	// declare an object of type T
	T ob;

	// define constructor that will assign reference to ob
	Gen(T o) {
		ob = o;
	}

	// define a method to return ob
	T getOb() {
		return ob;
	}

	// define a method to show type of T
	void showType() {
		System.out.println("Type of T is " + ob.getClass().getName());
	}
}
