public static void main(String args[]){
        GenericsTypeOld type = new GenericsTypeOld();
        type.set("Pankaj");
//        type.set(1); ClassCastException
        String str = (String) type.get(); //type casting, error prone and can cause ClassCastException
        System.out.println(str);
    }