Overhead associated with Exception vs Throwable in Java

前端 未结 8 856
一个人的身影
一个人的身影 2020-12-05 06:53

I know

throw new Exception();

has a pretty large overhead, since it creates a full stackTrace, etc.
Does

throw new Thr         


        
8条回答
  •  甜味超标
    2020-12-05 07:32

    Throwable vs. Exception

    Java Exception

    As @mangoDrunk said:"Throwable is the superclass of exception and error."

提交回复
热议问题