Java Reflection class is synthetic

Description

Java Reflection class is synthetic

public class Main {  
  public static void main(String args[]) throws Exception {      
    Class<?> c = Class.forName("java.lang.String");  
    System.out.println("Is synthetic class: "+c.isSynthetic());     
    //from   w w w.j  a v a 2 s . c  o m
    c = String.class;
    System.out.println("Is synthetic class: "+c.isSynthetic());     
    
    c = int[].class;
    System.out.println("Is synthetic class: "+c.isSynthetic());     
    
    c = int.class;
    System.out.println("Is synthetic class: "+c.isSynthetic());     
    
    c = Class.class;
    System.out.println("Is synthetic class: "+c.isSynthetic());     
  }  
} 



PreviousNext

Related