Computer Science, asked by damodarsahu1234, 9 months ago

difference between try and catch statements in java​

Answers

Answered by Anonymous
2

Answer:

HELLO MATE

Explanation:

Java try and catch

The try statement allows you to define a block of code to be tested for errors while it is being executed.

The catch statement allows you to define a block of code to be executed, if an error occurs in the try block.

The try and catch keywords come in pairs:

try { // Block of code to try } catch(Exception e) { // Block of code to handle errors }

Similar questions