Last active
August 29, 2015 14:12
-
-
Save CesarNog/e06a28849b09d448f0b0 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 TesteHerancaMultipla { | |
interface Cliente { | |
default BigDecimal calcular(BigDecimal valor) { | |
return valor.multiply(new BigDecimal(10)).divide(new BigDecimal(100)); | |
} | |
} | |
public interface Cantar { | |
default void cantar() { | |
System.out.println(“Gosto de cantar la la la…”); | |
} | |
} | |
public class Pessoa implements Cliente, Cantar { | |
} | |
@Test | |
public void teste() { | |
Pessoa pessoa = new Pessoa(); | |
System.out.println(pessoa.calcular(new BigDecimal(1500))); | |
pessoa.cantar(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment