27 lines
425 B
Markdown
27 lines
425 B
Markdown
---
|
|
parents:
|
|
- "[[Вопросы для собеседование Java]]"
|
|
---
|
|
```java
|
|
public class Main {
|
|
|
|
public static void main(String[] args) {
|
|
System.out.println(method());
|
|
}
|
|
|
|
private static int method() {
|
|
try {
|
|
throw new RuntimeException();
|
|
} catch (RuntimeException e) {
|
|
return 1;
|
|
} finally {
|
|
return 2;
|
|
}
|
|
}
|
|
|
|
}
|
|
```
|
|
|
|
%%
|
|
2
|
|
%% |