Example
package com.vinod.test;
public class GetClassName {
public static void main(String[] args) {
Integer integer=new Integer("10");
System.out.println("Created Object "+integer);
Class<? extends Integer> className=integer.getClass();
System.out.println("Objects class Name "+className);
}
}
public class GetClassName {
public static void main(String[] args) {
Integer integer=new Integer("10");
System.out.println("Created Object "+integer);
Class<? extends Integer> className=integer.getClass();
System.out.println("Objects class Name "+className);
}
}
Output
Created Object 10
Objects class Name class java.lang.Integer
No comments:
Post a Comment