Java interview questions | Exceptions [Answers with examples]

Published: 08 May 2021
on channel: Acing Programming Interview
12,213
74

Exceptions

Java interview questions | Exceptions [Answers with examples]

In this video we will respond to several Java interview questions which are related to exceptions.

0:00 - Intro
0:21 - Can you describe top three levels of exception hierarchy?
1:02 - Is Throwable an interface or a class?
1:25 - Which methods from the exception hierarchy are most commonly used?
2:06 - What are the well-known keywords used for exception handling?
2:48 - What is the difference between the throw and throws keyword in Java?
3:53 - What is the difference between Checked and Unchecked Exceptions in Java?
5:21 - What is the difference between final, finally, and finalize in Java?
5:55 - What happens when a thrown exception is not handled anywhere in the code?
6:15 - What happens if an exception is being thrown from a static initialization block?
7:11 - Can we have an empty catch block?
7:41 - Can we rethrow same exception multiple times?
8:08 - Can we use try without catch?
8:52 - What are the constraints for overridden methods when it comes to exception handling?
9:47 - What is multi-catch block?
10:27 - What is try-with-resources?
11:16 - Example 1
11:41 - Example 2
12:11 - Example 3
13:06 - Example 4

Best books for programming:
Head First Design Patterns: A Brain-Friendly Guide
https://amzn.to/3gjvI9R

Clean Code: A Handbook of Agile Software Craftsmanship
https://amzn.to/2TpqWPh

Cracking the Coding Interview: 189 Programming Questions and Solutions
https://amzn.to/3xfVJMY

Effective Java
https://amzn.to/3gjCYTh

Good laptops for programming:
Lenovo ThinkPad L14 1st Gen 20U5000UUS Model - AMD Ryzen 7 Pro 4750U - 256 GB SSD – 8GB RAM - AMD Radeon Graphics
https://amzn.to/3wmQU4v

Lenovo ThinkPad T460s (20F9-0038US) Intel Core i5-6300U, 8GB RAM, 256GB SSD
https://amzn.to/3wk9ESc

Lenovo ThinkPad E15 Home and Business Laptop (Intel i3-10110U 2-Core, 16GB RAM, 512GB SATA SSD, Intel UHD, 15.6" Full HD (1920x1080)) with Hub
https://amzn.to/35gijZT

#AcingProgrammingInterview #JavaInterviewQuestions #Exceptions


On this page of the site you can watch the video online Java interview questions | Exceptions [Answers with examples] with a duration of hours minute second in good quality, which was uploaded by the user Acing Programming Interview 08 May 2021, share the link with friends and acquaintances, this video has already been watched 12,213 times on youtube and it was liked by 74 viewers. Enjoy your viewing!