fork download
  1. public class Main {
  2. String a;
  3. public class A {
  4. public void B() {
  5. a = "hoge";
  6. }
  7. }
  8.  
  9. Main() {
  10. A x = new A();
  11. x.B();
  12. String b = a;
  13. System.out.println(b);
  14. }
  15.  
  16. public static void main(String[] args) {
  17. new Main();
  18. }
  19. }
Success #stdin #stdout 0.03s 245632KB
stdin
Standard input is empty
stdout
hoge