What is the use of a catch block with an ellipsis (...)? 

  • To catch integer exceptions. 
  • To catch all exceptions irrespective of its type. 
  • To denote omission in code. 
  • To handle multiple exceptions at once.
A catch block with an ellipsis (...) is used to catch all exceptions, irrespective of their type. This can be useful when you want to ensure that no exceptions go unhandled, but it's often a good practice to handle specific exceptions with their respective catch blocks.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *