if (depth < 5) {
System.out.println("In Java, depth = " + depth + ", about to enter C");
nativeMethod(depth + 1);
System.out.println("In Java, depth = " + depth + ", back from C");
} else
System.out.println("In Java, depth = " + depth + ", limit exceeded");