Yes. A finally block can follow a try block or catch block. So we
can defined a finally block just after a try block
xxxxxxxxxx
public class Test {
public static void main(String args[]) {
int a[] = new int[2];
try {
} finally {
a[0] = 6;
System.out.println("First element value: " + a[0]);
System.out.println("The finally statement is executed");
}
}
}