what is unreachable code problem in multiple catch statements

Answer Posted / deepthi

if v just gve a default exception block,bfre the specific
catch statement it ll create a unreachable code exception
e.g
catch(Exception e)
{System.out.println(unknown exception);}
catch(ArithmeticException e)
{System.out.println("Division by zero");}

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do we access static members in java?

843


Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.

713


What is the difference between the ">>" and " >>>" operators in java?

737


what state does a thread enter when it terminates its processing? : Java thread

823


What are the benefits of immutable objects?

760


What is the difference between superclass and subclass?

788


What is the syntax and characteristics of a lambda expression? Explain

797


Is java hard to learn?

694


What is ide with example?

725


How does thread synchronization occurs inside a monitor?

775


Explain yield() method in thread class ?

828


What are the super most classes for all the streams?

1815


What is the difference between applet and application?

738


Can you call one constructor from another if a class has multiple constructors?

796


What are the application of stack?

683