Java by API/java.lang/IllegalAccessException

Материал из Java эксперт
Перейти к: навигация, поиск

new IllegalAccessException(String name)

/*
 * Output:
 * 
Exception in thread "main" java.lang.IllegalAccessException: demo
caught inside procedure
  at MainClass.main(MainClass.java:12)
 * 
 *  
 */
public class MainClass {
  public static void main(String args[]) throws Exception{
    System.out.println("caught inside procedure");
    throw new IllegalAccessException("demo");
  }
}