mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
28 lines
717 B
Java
28 lines
717 B
Java
import java.io.IOException;
|
|
import java.sql.SQLException;
|
|
import java.util.concurrent.ThreadLocalRandom;
|
|
|
|
class A {
|
|
void f() {
|
|
int i = 0;
|
|
try {
|
|
i = 1;
|
|
try {
|
|
i = 2;
|
|
if (r()) throw new IOException();
|
|
<selection>i = 3;
|
|
if (r()) throw new SQLException();
|
|
i = 4;</selection>
|
|
System.out.println("ok");
|
|
} catch (IOException e) {
|
|
System.out.println("io " + i);
|
|
}
|
|
} catch (SQLException e) {
|
|
System.out.println("sql");
|
|
}
|
|
}
|
|
|
|
private boolean r() {
|
|
return ThreadLocalRandom.current().nextBoolean();
|
|
}
|
|
} |