Last active
August 29, 2015 14:12
-
-
Save CesarNog/ba23ece30000fccc0c3a 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
public class TestMultipleHeritance { | |
interface Client { | |
default BigDecimal calculate(BigDecimal value) { | |
return value.multiply(new BigDecimal(10)).divide(new BigDecimal(100)); | |
} | |
} | |
interface Sing { | |
default void sing() { | |
System.out.println("I like to sing..."); | |
} | |
} | |
class Person implements Client, Sing { | |
} | |
@Test | |
public void test() { | |
Person person = new Person(); | |
System.out.println(person.calculate(new BigDecimal(1500))); | |
person.sing(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment