fork download
  1. interface Something {
  2. void doSomething();
  3. }
  4.  
  5. interface Otherthing {
  6. void doOtherthing();
  7. }
  8.  
  9. class Whatever implements Something, Otherthing {
  10. public void doSomething() {
  11. System.out.println("Do something !");
  12. }
  13. public void doOtherthing() {
  14. System.out.println("Do otherthing !");
  15. }
  16. }
  17.  
  18. class Test {
  19. public static void main(String[] arguments) {
  20. Something s = new Whatever();
  21. s.doSomething();
  22. Otherthing w = new Whatever();
  23. w.doOtherthing();
  24. }
  25. }
  26.  
  27. //http://pt.stackoverflow.com/q/179966/101
Success #stdin #stdout 0.04s 711168KB
stdin
Standard input is empty
stdout
Do something !
Do otherthing !