Java SE 13: Correctly Using Try-Catch-Finally Blocks
Java
| Intermediate
- 11 videos | 1h 17m 5s
- Includes Assessment
- Earns a Badge
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 courseIdentify the situations when divide-by-zero exceptions ariseApply the methods of the exception base class to obtain exception informationUse multiple independent catch blocks with a single try blockCombine multiple independent catch blocks using the | operatorCombine multiple related catch blocks using the | operator
-
Employ correct exception-handling techniques for io-intensive operations such as working with filesUse the finally keyword to ensure correct release of file handles and other system resourcesRecognize the exact semantics and limitations of the finally blockCorrectly place the finally block relative to the catch blocksSummarize the key concepts covered in this course
IN THIS COURSE
-
2m 10s
-
6m 44sFind out how to identify the situations when divide-by-zero exceptions occur. FREE ACCESS
-
10m 12sTo find out how to apply the methods of the Exception base class to obtain exception information. FREE ACCESS
-
9m 8sIn this video, you will use multiple catch blocks with a single try block. FREE ACCESS
-
8m 12sIn this video, you will learn how to combine multiple independent catch blocks using the "|" operator. FREE ACCESS
-
8m 36sTo combine multiple related catch blocks, use the | operator. FREE ACCESS
-
8m 44sIn this video, learn how to use correct exception-handling techniques for IO-intensive operations such as working with files. FREE ACCESS
-
7m 51sIn this video, you will learn how to use the finally keyword to ensure the correct release of file handles and other system resources. FREE ACCESS
-
8m 44sAfter completing this video, you will be able to recognize the semantics and limitations of the finally block. FREE ACCESS
-
5m 31sIn this video, find out how to correctly place the finally block in relation to the catch blocks. FREE ACCESS
-
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 on some of our courses, which can be shared on any social network or business platform.
Digital badges are yours to keep, forever.