1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Exceptions in C++ and Java

Discussion in 'Java' started by shabbir, Nov 18, 2006.

  1. shabbir

    shabbir Administrator Staff Member

    Jul 12, 2004
    Likes Received:
    Trophy Points:
    I always wondered whether there's any reason why exception specifications are enforced at runtime, rather than at compile-time like in Java? (This was prompted by reading an article on GOTW, but lost the link and I am not sure about that as well) Is there something about C++ that makes it harder/impossible to check at compile-time or is there anything specific advantage of making it at compile time in Java?

Share This Page