Java SE 13: Correctly Using Try-Catch-Finally Blocks

Java SE 13
  • 11 Videos | 1h 21m 35s
  • Includes Assessment
  • Earns a Badge
Likes 8 Likes 8
This course covers the bedrock of Exception Handling in Java, the try-catch-finally code structure. Participants will cover the class hierarchies in exception handling; the stream and file processing; and how Java's support for exceptions and streams is built around complex class structures. You will learn how code might result in exceptions that are enclosed within a try block. Because this code structure could result in a signal to Java that normal programming might be disrupted and will cause the code evaluation to be short-circuited, the course explores details of catch blocks, including the use of multiple catch blocks; the use of the pipe operator ( | operator) to chain different exceptions within the same catch block; and how catch blocks must be arranged for related exceptions. The last part of exception handling is the 'finally block.' This keyword (finally) is used to ensure the correct release of resources, such as file handles, no matter what handled or unhandled exceptions might arise within the try block.

WHAT YOU WILL LEARN

  • discover the key concepts covered in this course
    identify the situations when divide-by-zero exceptions arise
    apply the methods of the Exception base class to obtain exception information
    use multiple independent catch blocks with a single try block
    combine multiple independent catch blocks using the | operator
    combine multiple related catch blocks using the | operator
  • employ correct exception-handling techniques for IO-intensive operations such as working with files
    use the finally keyword to ensure correct release of file handles and other system resources
    recognize the exact semantics and limitations of the finally block
    correctly place the finally block relative to the catch blocks
    summarize the key concepts covered in this course

IN THIS COURSE

  • Playable
    1. 
    Course Overview
    2m 10s
    UP NEXT
  • Playable
    2. 
    Divide-by-Zero Exceptions
    6m 44s
  • Locked
    3. 
    Exception Information
    10m 12s
  • Locked
    4. 
    One Try with Multiple Catch Blocks
    9m 8s
  • Locked
    5. 
    Using | to Combine Multiple Catch Blocks
    8m 12s
  • Locked
    6. 
    Related Catch Blocks
    8m 36s
  • Locked
    7. 
    Exception Handling for IO Operations
    8m 44s
  • Locked
    8. 
    Using the finally Keyword
    7m 51s
  • Locked
    9. 
    Semantics and Limitations of finally
    8m 44s
  • Locked
    10. 
    Correct Positioning of finally
    5m 31s
  • Locked
    11. 
    Course Summary
    1m 13s

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform

Digital badges are yours to keep, forever.

YOU MIGHT ALSO LIKE