Online Java Compiler By
JavaTpoint.com
//import statements public class ClassisAnonymousClassExample2 { public static void main(String... args) { Class extends Object> obj = new Object() {}.getClass(); boolean bl = obj.isAnonymousClass(); System.out.println(bl); } }
Output