Welcome to Questionaries, where you can ask questions and receive answers from other members of the community.

Let us know at info@questionaries.org

try-catch Statements...............!

11 like 0 dislike
hello,

          Can any one help me,which form I can use for  Simple Statements?Please give your answer as early as possible.............
asked 1 year ago by biswaskeran (70,430 points)

1 Answer

2 like 0 dislike
Hi,
  A try-catch statement should have the following format:

    try {
        statements;
    } catch (ExceptionClass e) {
        statements;
    }

A try-catch statement may also be followed by finally, which executes regardless of whether or not the try block has completed successfully.

    try {
        statements;
    } catch (ExceptionClass e) {
        statements;
    } finally {
        statements;
    }

Thanks
answered 1 year ago by tulip (12,960 points)

Related questions

11 like 0 dislike
1 answer
12 like 0 dislike
1 answer
9 like 0 dislike
1 answer
asked 1 year ago by lily (17,510 points)
10 like 0 dislike
1 answer
asked 1 year ago by biswaskeran (70,430 points)
12 like 0 dislike
2 answers
asked 1 year ago by biswaskeran (70,430 points)