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

What is method with example?

804


Can you access non static variable in static context?

806


Explain about the interpreter in java?

846


What is double word?

766


What are encapsulation, inheritance and polymorphism?

746


What is sizeof () operator?

761


What is immutable in java?

801


What is java developer skills?

761


What is replaceall in java?

793


Is array an object in java?

758


Is it necessary for the port addresses to be unique? Explain with reason.

803


These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }

819


Explain java coding standards for classes or java coding conventions for classes?

894


What is the string function?

764


how to convert Java project into Maven ?

814