Last active
October 11, 2019 19:34
-
-
Save juliofalbo/8fe7f8323ea65408f723776ba8b7493a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface SomeInterfaceJava8 { | |
Integer customCalc(int a, int b); | |
default Integer calc(int a, int b) { | |
return (a + b); | |
} | |
} | |
class SomeImplementationJava8 implements SomeInterfaceJava8 { | |
@Override | |
public Integer customCalc(int a, int b) { | |
return calc(a, b) + 1; | |
} | |
} | |
class AnotherImplementationJava8 implements SomeInterfaceJava8 { | |
@Override | |
public Integer customCalc(int a, int b) { | |
return calc(a, b) + 2; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment