fork(90) download
  1. class Ideone {
  2. public static void main (String[] args) throws java.lang.Exception {
  3. System.out.println(new Test2().getTest());
  4. Test.test = "changed";
  5. System.out.println(new Test2().getTest());
  6. }
  7. }
  8.  
  9. class Test {
  10. protected static String test = "test";
  11. }
  12.  
  13. class Test2 extends Test {
  14. public String getTest() {
  15. return test;
  16. }
  17. }
Success #stdin #stdout 0.08s 380224KB
stdin
Standard input is empty
stdout
test
changed