Specifications
Sun Services
Java™ Programming Language
Module 8, slide 11 of 25
Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision F
The finally Clause
The finally clause defines a block of code that always
executes.
1 try {
2 startFaucet();
3 waterLawn();
4 } catch (BrokenPipeException e) {
5 logProblem(e);
6 } finally {
7 stopFaucet();
8}










