answersLogoWhite

0

Yes, the format of a try/catch/finally block is:

try{

// Do Code

} catch (Throwable A) {

// Process throwable/exception

} catch (OtherThrowable B) {

// Process throwable/exception

}

// ... and so on and so forth, catching as many different catches as needed

finally{

// Code you always want to execute, whether breaking out of a try

// statement normally or by catching a throwable.

// For example, close database connections or file handles here.

}

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

What is the purpose of catch block in java?

to provide an action in case the code block in the try statement fails.


How do you unlock the throwable items on zwinky?

Nell first you have to go to the "zwink!" which is located on your map. Then you click on the beach ball. It will tell you to go to a place called java jolt. Do so When you get to java jolt click on the face. NOW YOU GOT YOUR EXPRESSIONS AND YOUR THROWABLES!!


What are control structures used in javascript?

The control structures used in java script are if-statement, for-loop, for-in loop, while loop,do-while loop, switch-statement, with-statement. try-catch-finally statements.


What does java not support?

Java does not support multiple inheritance.......


What advantage does Java's break statement have over C's break statement?

They do the same thing, but only the former can be used in a Java program.


What does do in java?

You never write "do" seperately in Java. The only situation I can think of when you have to write "do" is in the "do while" statement. This is the syntax: do { statement(s) } while (expression);


Give the structure of multiple inheritance?

Java does not support multiple inheritance. It is done with the help of interfaces in java. a class can implement n number of interfaces, thus showing multiple inheritance. but a class cannot extend multiple classes in java.


What are semicolons used in java?

to end a statement


What is ambiguity in multiple inheritance?

Java does not support multiple inheritance


What is a simple java code and explain what the code does?

int a;This simple Java statement declares an integer.


What is case in java?

Case is used to label each branch in the switch statement in Java Program


What is problem in multiple inheritance?

Java does not support direct multiple Inheritance. Harder to implement, not every language support it: C++ does, Java does not.