O'Reilly logo
  • You Wang thinks this is interesting:

As you can see, it took far longer to catch an exception than to perform a simple test. The moral is: Use exceptions for exceptional circumstances only.


Cover of Core Java® Volume I—Fundamentals, Tenth Edition


exception trades performance with safety, so if checking works, don't use exception