fork(1) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Ideone
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. Derived d = new Derived();
  10. d.getMe().doADerivedThing();
  11. }
  12.  
  13. private static class Base
  14. {
  15. public Base getMe() {
  16. return this;
  17. }
  18. }
  19.  
  20. private static class Derived extends Base
  21. {
  22. public int doADerivedThing() {
  23. return 100;
  24. }
  25. }
  26. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:10: error: cannot find symbol
        d.getMe().doADerivedThing();
                 ^
  symbol:   method doADerivedThing()
  location: class Base
1 error
stdout
Standard output is empty