Skip to main content

CS102: Introduction to Computer Science II

Page path
  • Home /
  • Courses /
  • Course Catalog /
  • Computer Science /
  • CS102: Introduction to Computer Science II /
  • Unit 4: Exceptions /
  • 4.2: Exceptions in Java and C++
Back to 'Unit 4: Exceptions'
  • 4.2: Exceptions in Java and C++

      • 4.2.1: Exceptions in Java

        • W3Resource: "Exceptions in Java" Page

          This article article illustrates the Java flow to handle an exception. Java uses  'try' and 'catch' blocks for the code that handles the exception, and a 'throw' keyword used in the method where the exception occurs. There are 4 sections to the reading, each after the first accessed by clicking <next>. Be sure to read each.

        • TheJavaWorld: "Java Error Handling" Page

          There are several design decisions and are addressed in the design activity of the programming process, including what exceptions to handle, where to place the exceptions handlers, the correspondence of try's to 'catches', the nesting of exception handlers, and which methods will have the throw keywords.

        • Hobart and William Smith Colleges: David Eck's "Introduction to Programming Using Java" Page

          Read section 8.3, which is a continuation of the previous sections on correctness and robustness, and elaborates on exceptions in Java.

      • 4.2.2: Exceptions in C++

        • C++ Programming: "Exception Handling" Page

          Read this overview of the role of exceptions generated by the C++ library. This section also covers throw and try/catch concepts.

    Navigation

    Art History
    Biology
    Business Administration
    Chemistry
    Communication
    Economics
    English
    History
    Mathematics

    Creative Commons License
    © Saylor Academy 2010-2018 except as otherwise noted. Excluding course final exams, content authored by Saylor Academy is available under a Creative Commons Attribution 3.0 Unported license. Third-party materials are the copyright of their respective owners and shared under various licenses. See www.saylor.org/open/licensinginformation for detailed licensing information.

    Saylor Academy and Saylor.org® are trade names of the Constitution Foundation, a 501(c)(3) organization through which our educational activities are conducted.

    Terms of Use | Privacy Policy