try statement

1 topic · 1 source

Technology› Programming

Java

The try statement acts as an exception handler - a place where exception objects are caught and dealt with. In its most general form, it consists of a try clause, one or more catch clauses and a finally clause.

 try{ statement; ... } catch(Exception e){ statement; ... } finally{ statement; ... } 
Either of the catch clause and finally clause may be omitted, but not both.

Cite this definition

APA
MLA
Chicago