Throw和Throws

  • Position : Throw inside method body, Throws in the method name
  • Role : Throw is used to throw an exception, Throws is used to declare an exception
  • Number : Throw can only throw an exception, Throws one can declare more than one exception

Guess you like

Origin www.cnblogs.com/zbzb1/p/11531535.html