You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
205 B
15 lines
205 B
4 months ago
|
package lambda;
|
||
|
|
||
|
public class A {
|
||
|
|
||
|
public static void main(String[] args) {
|
||
|
new A().run(new B()::doIt);
|
||
|
new A().run(B::doItStatic);
|
||
|
}
|
||
|
|
||
|
public void run(Runnable todo) {
|
||
|
todo.run();
|
||
|
}
|
||
|
|
||
|
}
|