What does <init> signify in a Java exception?
问题 What does <init> signify in a Java exception? For example: BlahBlahException... at java.io.FileInputStream.<init>(FileInputStream.java:20) 回答1: That the exception is thrown in the construction of the object, there are two options: in the constructor while initializing variables Check out this demo I wrote: http://ideone.com/Mm5w5 class Main { public static void main (String[] args) throws java.lang.Exception { try { new Test(); } catch (Exception e) { e.printStackTrace(); } try { new Test2();