Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • Thank you, When a checked exception is thrown, only callers who can handle it properly should catch it with a try/catch. A runtime exception, should not be caught in the program. If you catch it, you run the risk that a bug in the code will be hidden from view at runtime. Is my understanding right? Commented Mar 16, 2023 at 10:42
  • @miaosun: Not necessarily - you certainly can catch RuntimeExceptions, and sometimes that's appropriate... but it's less common. Commented Mar 16, 2023 at 11:02