interface Something {
void doSomething();
}
interface Otherthing {
void doOtherthing();
}
class Whatever implements Something, Otherthing {
public void doSomething() {
System.
out.
println("Do something !"); }
public void doOtherthing() {
System.
out.
println("Do otherthing !"); }
}
class Test {
public static void main
(String[] arguments
) { Something s = new Whatever();
s.doSomething();
Otherthing w = new Whatever();
w.doOtherthing();
}
}
//http://pt.stackoverflow.com/q/179966/101
aW50ZXJmYWNlIFNvbWV0aGluZyB7CiAgICB2b2lkIGRvU29tZXRoaW5nKCk7Cn0KCmludGVyZmFjZSBPdGhlcnRoaW5nIHsKICAgIHZvaWQgZG9PdGhlcnRoaW5nKCk7Cn0KCmNsYXNzIFdoYXRldmVyIGltcGxlbWVudHMgU29tZXRoaW5nLCBPdGhlcnRoaW5nIHsKICAgIHB1YmxpYyB2b2lkIGRvU29tZXRoaW5nKCkgewogICAgICAgU3lzdGVtLm91dC5wcmludGxuKCJEbyBzb21ldGhpbmcgISIpOwogICAgfSAgICAgCiAgICBwdWJsaWMgdm9pZCBkb090aGVydGhpbmcoKSB7CiAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oIkRvIG90aGVydGhpbmcgISIpOwogICAgfQp9CgpjbGFzcyBUZXN0IHsKICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3VtZW50cykgewogICAgICAgIFNvbWV0aGluZyBzID0gbmV3IFdoYXRldmVyKCk7CiAgICAgICAgcy5kb1NvbWV0aGluZygpOwogICAgICAgIE90aGVydGhpbmcgdyA9IG5ldyBXaGF0ZXZlcigpOyAKICAgICAgICB3LmRvT3RoZXJ0aGluZygpOwogICAgfQp9CgovL2h0dHA6Ly9wdC5zdGFja292ZXJmbG93LmNvbS9xLzE3OTk2Ni8xMDE=