mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
17 lines
335 B
Java
17 lines
335 B
Java
class TryFinally {
|
|
int method() {
|
|
String s = "abcd";
|
|
|
|
return newMethod(s);
|
|
}
|
|
|
|
private int newMethod(String s) {
|
|
StringBuffer buffer = new StringBuffer();
|
|
try {
|
|
buffer.append(s);
|
|
return buffer.length();
|
|
} finally {
|
|
buffer.clear();
|
|
}
|
|
}
|
|
} |