mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-24 17:51:09 +07:00
13 lines
212 B
Java
13 lines
212 B
Java
class Test {
|
|
|
|
Node findRoot(Node n) {
|
|
while(n.getParent() != null) {
|
|
n = <selection>n.getParent()</selection>;
|
|
}
|
|
return n;
|
|
}
|
|
}
|
|
interface Node {
|
|
Node getParent();
|
|
}
|