fork(2) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main(String[] args) {
  11. B.Y.Q.main();
  12. }
  13. }
  14.  
  15. class A<T> {
  16. static class X {
  17. static class Q {
  18. public static void main() {
  19. System.out.println("A<T>.X.Q");
  20. }
  21. }
  22. }
  23. }
  24.  
  25.  
  26. class B extends A<B.Y.Q> {
  27. static class Y extends A.X {
  28. } // X here is inherited from A
  29. }
  30.  
  31. class X {
  32. static class Q {
  33. public static void main() {
  34. System.out.println("X.Q");
  35. }
  36. }
  37. }
  38.  
  39.  
Success #stdin #stdout 0.04s 4386816KB
stdin
Standard input is empty
stdout
A<T>.X.Q