What does signify in a Java exception?

前端 未结 2 1926
悲&欢浪女
悲&欢浪女 2020-12-10 12:04

What does signify in a Java exception?

For example:

BlahBlahException...

at java.io.FileInputStream.(FileInput         


        
2条回答
  •  悲哀的现实
    2020-12-10 12:22

    <init>

    is called

    Instance Initialization method

    which is created by your java compiler from the constructor you have defined. Though it is not valid method definition, your JVM expects this and anything that you put in the constructor will be executed in method. So when you an exception with from , you can be sure that it is from the constructor of the executed java class. Read more about this on Bill venner's design technique articles on Object Initialization.

提交回复
热议问题