Checks whether the given object is an anonymous class object.
The isAnonymousClass method of Class class can be used to check whether the given object is an anonymous class object.
public class ClazzUtil {
public static void main(String[] args){
Class clazz = String.class;
boolean b = clazz.isAnonymousClass();
System.out.println(b);
}
}
Tags: Class, Class examples, java.lang, java.lang.Class
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply