Java Exceptions - How to Create Custom Exceptions | Java Tutorial Part 1 #012

preview_player
Показать описание
In this video, we will see how to create a custom exception. First, we create a Product class, and then create OutOfStockException. Then we will learn how java forces the developer to handle this custom exception when they use a specific method in Product class.

You learn about Checked Exception, the usage of throw and throws keyword in Java.

00:00 Introduction
02:18 Product Class
04:30 Need For Custom Exception
06:00 Eclipse Demo- Create Product Class
14:09 Creating Custom Exception
16:25 Use Custom Exception (Throws vs Throw)
21:30 Eclipse Demo - throwing custom Exception
28:57 Eclipse Demo - Delegate Exception using throws
Рекомендации по теме
join shbcf.ru