Yes,
Incase we want to throw some exception from the current method that would be cought later by the calling program and perform some business operation, try-finally is written w/o a catch block.
like ...
public int getInterest() throws AException{
try{
abc ...
Throw new AException();
...
}finally{
Do ... some .... clearance operation
}
}
NOTE: try block should have catch or finally block, Only try block cant work/compile.
e martë, 12 qershor 2007
Abonohu te:
Posto komente (Atom)
Nuk ka komente:
Posto një koment