Java Interview Question And Answer 35 Java Exception Interview Question Part 1
Click here - https://www.youtube.com/channel/UCd0U_xlQxdZynq09knDszXA?sub_confirmation=1 to get notifications. Java Interview Question And Answer 35 Java Exception Interview Question Part 1
1.What is an Exception ?
Exception is abnormal condition that can be handled .In Other Word An unwanted, unexpected event that disturbs normal flow of the program is Exception.
2. What is an Error ?
The Abnormal condition that can't be handled that is called error . Ex [System failure,JVM Shutdown]
3. What is the purpose of Exception handling ?
The main purpose of Exception of handling is for graceful termination of the program.
4. What is meaning of Exception handling ?
Exception Handling dosen't mean repairing the exception we have to define alternative way to continue the rest of code normally.
5. What is the purpose of the try block ?
We should maintain the risky code inside try block.
6. What is the purpose of the catch block ?
We have maintain all the Exception handling code in side the catch block.
7. What is try ?
Some time interviewer might ask this type of question and try to confuse you but don't confuse, answer is so simple try is a key word in java.
8. What is catch ?
Same case as a try catch is also key word in java.
9. Is try block with multiple catch Block possible?
Yes its possible You can Write a try block with multiple catch block for separate catch block for every exception.
Ex. try{
risky code;
}Catch(IOException e){
}Catch(ArithmaticException e){
} etc.
10. If try multiple catch block present is order of catch block is important in which order we have to take?
If try has multiple catch block ,then the order of catch block is important it should from child to parent not parent to child.
11. what are the various method in Exception class ?
There are various method in Exception class
printstackTrace() :- This Method print exception information in the following format. Name of the Exception Description StackTrace
toString() This method print information in the following format. Name of the Exception Description
getMessage() This method print only description of the exception
12. If an exception raised in catch block what will happen ?
If an Exception raised in catch block and it is not part of any try block then it is always abnormal termination.
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Java Interview Question And Answer 35 Java Exception Interview Question Part 1», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.