mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-24 14:26:37 +07:00
25 lines
294 B
Java
25 lines
294 B
Java
interface Runnable {
|
|
void run() {}
|
|
}
|
|
|
|
class A {
|
|
void foo() {
|
|
action(new Runnable() {
|
|
public void run() {
|
|
doIt();
|
|
}
|
|
});
|
|
}
|
|
|
|
void doIt() {}
|
|
|
|
static void action(Runnable action) {
|
|
action.run();
|
|
}
|
|
}
|
|
|
|
class Bar extends Runnable {
|
|
Bar() {
|
|
run();
|
|
}
|
|
} |