fork download
  1. interface MyInterface {
  2. void method();
  3. }
  4.  
  5. class secondClass implements MyInterface {
  6. public void method() { }
  7. }
  8.  
  9. class Ideone {
  10. private static void method(secondClass obj) {
  11. }
  12.  
  13. public static void main (String[] args) {
  14. secondClass obj = new secondClass();
  15. MyInterface interf = obj;
  16. method((secondClass)interf);
  17. }
  18. }
Success #stdin #stdout 0.08s 52560KB
stdin
Standard input is empty
stdout
Standard output is empty