📜  throw 关键字 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:57.054000             🧑  作者: Mango

代码示例2
Generally JVM throws the exception and
we handle the exceptions by 
using try catch block. But there are
situations where we have to throw 
userdefined exceptions or runtime exceptions.
  In such case we use throw keyword 
to throw exception explicitly.

  Syntax : throw throwableInstance;