Catch(Exception e){
}

in that what is Exception and purpose of that in that place
exactly?

Answer Posted / sreenu karampudi

The Catch block is used to catch the exception which is
from the try block. The exception type should be same in
order to catch it otherwise it won't

for example;

try {
// piece of code which gets ArthimeticException
}

Catch(ArthimeticException e) [
}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is type conversion in java?

773


Is there any way to skip finally block of exception even if some exception occurs in the exception block?

839


Is finalize() similar to a destructor?

766


What is java literals?

770


What are the different tags provided in jstl?

753


Differentiate between static and non-static methods in java.

793


What is object cloning in Java?

841


Explain about OOPS concepts and fundamentals.

804


Explain the pointers in Java?

808


What is <> used for in java?

846


What are anonymous inner classes?

743


Should you use singleton pattern?

707


What is meant by call by reference?

735


Is multiple inheritance supported by java?

694


Which object oriented concept is achieved by using overloading and overriding?

794