Java SE 13: Try-with-resources & Custom Exceptions
Java
| Intermediate
- 12 videos | 1h 27m 21s
- Includes Assessment
- Earns a Badge
In this course, you will learn about the correct use of the throws clause, Java's relatively new try-with-resources construct, and the use of custom exceptions. Explore how to correctly use the throws clause while defining method signatures and implementing exception handling in a chain of methods that sequentially call each other. You will learn to ensure that resources are automatically closed, relying on language support, using the try-with-resources construct; and recognize the precise semantics of this construct in Java. This leads to throwing an object of a built-in exception type to respond to an unexpected situation in a program, and differentiating between the semantics of throwing runtime exceptions versus checked exceptions. The correct way to invoke a method that throws an exception of a checked exception type will be examined, along with how to correctly declare or handle exceptions in a chain of functions, each of which throws different types of exceptions. Finally, participants will explore the use of custom exceptions, defining their own exception classes, and then throwing exceptions that belong to those classes.
WHAT YOU WILL LEARN
-
Discover the key concepts covered in this courseCorrectly use the throws clause while defining method signaturesImplement exception handling in a chain of methods that sequentially call each otherEnsure that resources are automatically closed, relying on language support, using the try-with-resources constructRecognize the precise semantics of the try-with-resources construct in javaThrow an object of a built-in exception type in order to respond to an unexpected situation in a program
-
Differentiate between the semantics of throwing runtime exceptions vs. throwing checked exceptionsCorrectly invoke a method that throws an exception of a checked exception typeCorrectly declare or handle exceptions in a chain of functions, each of which throws different types of exceptionsCreate a custom exception object by extending the base class exception, and throw an instance of this exception from your codeInstantiate and throw custom exception objects of both checked and unchecked exception typesSummarize the key concepts covered in this course
IN THIS COURSE
-
2m 8s
-
8m 31sIn this video, learn how to correctly use the throws clause when defining method signatures. FREE ACCESS
-
6m 53sLearn how to implement exception handling in a chain of methods that call each other sequentially. FREE ACCESS
-
11m 36sTo ensure that resources are automatically closed, rely on language support and use the try-with-resources construct. FREE ACCESS
-
9m 10sAfter completing this video, you will be able to recognize the precise semantics of the try-with-resources construct in Java. FREE ACCESS
-
8m 22sIn this video, find out how to throw an object of a built-in exception type in order to respond to an unexpected situation in a program. FREE ACCESS
-
6m 20sIn this video, you will learn how to differentiate between the semantics of throwing runtime exceptions and throwing checked exceptions. FREE ACCESS
-
5m 35sIn this video, learn how to correctly invoke a method that throws an exception of a checked exception type. FREE ACCESS
-
10m 23sDuring this video, you will learn how to correctly declare or handle exceptions in a chain of functions, each of which throws a different type of exception. FREE ACCESS
-
7m 59sDuring this video, you will learn how to create a custom exception object by extending the base class Exception, and throw an instance of this exception from your code. FREE ACCESS
-
9m 4sIn this video, you will create and throw custom exception objects of both checked and unchecked exception types. FREE ACCESS
-
1m 20s
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.