Object Oriented Software Engineering   View all facts   Glossary   Help
subject > programming language construct > statement > decision-making statement > Java decision-making statement > Java try catch statement
Next Java decision-making statementJava if statement    UpJava decision-making statement    Previous Java decision-making statementJava switch statement   

Java try catch statement comparison table
Subject is a kind of have example
Java decision-making statementJava statement 
Java try catch statementJava decision-making statement
//Any division by zero that occurs when executing the 
//try block will result in execution of the catch block.
//Once either block completes, execution continues
//at the statement after the catch block.
try
{
result = numerator / denominator;
validResult = true;
}
catch (ArithmeticException e)
{
validResult = false;
}

Next Java decision-making statementJava if statement    UpJava decision-making statement    Previous Java decision-making statementJava switch statement