fork 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 B {
  8. private int b;
  9. public int getB() { return b; }
  10. public void setB(int b) { b=b; }
  11. }
  12.  
  13. class A {
  14. public static void main (String[] args) {
  15. B b = new B();
  16. b.setB(5);
  17. System.out.println(b.getB());
  18. }
  19. }
Success #stdin #stdout 0.05s 4386816KB
stdin
Standard input is empty
stdout
0