fork(1) download
  1. class Java8Tester {
  2. public static void main(String args[]){
  3. Java8Tester tester = new Java8Tester();
  4.  
  5. MathOperation test = (a,b)->a*~a*b*~b/4;
  6.  
  7. System.out.println(tester.operate(0, 0, test));
  8. System.out.println(tester.operate(1, 1, test));
  9. System.out.println(tester.operate(3, 3, test));
  10. System.out.println(tester.operate(4, 4, test));
  11. System.out.println(tester.operate(6, 7, test));
  12. }
  13.  
  14. interface MathOperation {
  15. int operation(int a, int b);
  16. }
  17.  
  18. private int operate(int a, int b, MathOperation mathOperation){
  19. return mathOperation.operation(a, b);
  20. }
  21. }
Success #stdin #stdout 0.09s 711168KB
stdin
Standard input is empty
stdout
0
1
36
100
588