fork(1) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. class AA {
  8. public static int hello = 5;
  9. }
  10.  
  11. class BB extends AA { }
  12.  
  13. class Ideone
  14. {
  15. public static void main (String[] args) throws java.lang.Exception
  16. {
  17. BB bb = new BB();
  18. System.out.println(bb.hello);
  19. System.out.println(BB.hello);
  20. }
  21. }
Success #stdin #stdout 0.05s 4386816KB
stdin
Standard input is empty
stdout
5
5