fork download
  1. class Test {
  2. public static void main(String[] args) {
  3. Test test = new Test();
  4. test.setAction(() -> System.out.print("Action 1! "));
  5. }
  6.  
  7. public void setAction(T t) {
  8. t.m1();
  9. }
  10. }
  11.  
  12. interface T {
  13. public void m1();
  14.  
  15. }
Success #stdin #stdout 0.13s 4386816KB
stdin
Standard input is empty
stdout
Action 1!