#7 What are checked and unchecked exceptions in Java?

Опубликовано: 10 Июль 2023
на канале: Abhishek Verma
1,828
131

In this short we explain how not to answer in Java interview when questioned about What are checked and unchecked exceptions in Java? #shorts #javaprogramming

Generally candidates say Checked exceptions occur at compile time and unchecked exceptions occur at runtime

Instead we shold say that Checked exceptions are exceptions that the compiler forces us to handle or declare in a method signature using the throws keyword eg I/OException. while Unchecked exceptions are exceptions that the compiler does not force you to handle explicitly like NullPointerException or ArithmeticException.

Tell in comment section What is your way of giving correct answer?
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Binge watch our various playlists:    / scaleupindia  
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Subscribe to our channel and press the bell icon to get regular updates:
https://www.youtube.com/@ScaleUpIndia...
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
📌 Social Media
Creator LinkedIn:   / abhishekvermaa10  
Channel LinkedIn:   / scale-up-india  
For Business Enquiry, mail at [email protected]
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Copyright © 2023 ScaleUp India - All Rights Reserved