1) In C++, all types (including primitive and pointer) can be thrown as exception. But in Java only throwable objects (Throwable objects are instances of any subclass of the Throwable class) can be thrown as exception
2) In C++, there is a special catch called “catch all” that can catch all kind of exceptions.
3) In Java, there is a block called finally that is always executed after the try-catch block. This block can be used to do cleanup work. There is no such block in C++.
Read full article from Comparison of Exception Handling in C++ and Java | GeeksforGeeks
2) In C++, there is a special catch called “catch all” that can catch all kind of exceptions.
3) In Java, there is a block called finally that is always executed after the try-catch block. This block can be used to do cleanup work. There is no such block in C++.
4) In C++, all exceptions are unchecked. In Java, there are two types of exceptions – checked and unchecked.
5) In Java, a new keyword throws is used to list exceptions that can be thrown by a function. In C++, there is no throws keyword, the same keyword throw is used for this purpose also.Read full article from Comparison of Exception Handling in C++ and Java | GeeksforGeeks