class GenericDemo {
//a generic method to show class name and type of argument
static <T> void showGeneric(T t){
System.out.println(t.getClass().getName()+"="+t);
}
//driver method
public static void main(String[] args) {
//calling Generic function with Integer type of argument
showGeneric(15);
//calling Generic function with String type of argument
showGeneric("JAVAINVENT");
//calling Generic function with double type of argument
showGeneric(5.5);
//calling Generic function with float type of argument
showGeneric(15.15f);
}
}