Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. package test.test;
  2. public class Base {
  3. public static void main(String[] args) {
  4. Interface1 a = n -> System.out.println(2*n);
  5. }
  6. }
  7. interface Interface1 {
  8. void multiplyByTwo(int x);
  9. }
  10.  
  11. package test.test;
  12. public class Base implements Interface3 {
  13. public static void main(String[] args) {
  14. Interface3 b = n -> System.out.println(4*n);
  15. }
  16. }
  17.  
  18. package test.test;
  19. public interface Interface3 {
  20. void multiplyByFour(int x);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement