mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-23 16:20:55 +07:00
21 lines
424 B
Java
21 lines
424 B
Java
import org.jetbrains.annotations.Nullable;
|
|
|
|
class C {
|
|
private int[] list;
|
|
|
|
private int find(int id) {
|
|
Integer n = newMethod(id);
|
|
if (n != null) return n;
|
|
throw new RuntimeException();
|
|
}
|
|
|
|
@Nullable
|
|
private Integer newMethod(int id) {
|
|
for (int n : list) {
|
|
if (n == id) {
|
|
return n <= 0 ? 0 : n;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
} |