why is java.lang.Throwable a class?

后端 未结 4 1298
鱼传尺愫
鱼传尺愫 2021-01-31 08:25

In java adjectives ending in -able are interfaces Serializable, Comparable etc... So why is Throwable a class? Wouldn\'t exception handlin

4条回答
  •  猫巷女王i
    2021-01-31 09:10

    FYI

    You can not use

    void doSomething() throws Serializable
    

    but you can use generics!

     doSomething() throws T
    

    Regards

提交回复
热议问题