Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package test.test;
- public class Base {
- public static void main(String[] args) {
- Interface1 a = n -> System.out.println(2*n);
- }
- }
- interface Interface1 {
- void multiplyByTwo(int x);
- }
- package test.test;
- public class Base implements Interface3 {
- public static void main(String[] args) {
- Interface3 b = n -> System.out.println(4*n);
- }
- }
- package test.test;
- public interface Interface3 {
- void multiplyByFour(int x);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement