fork download
  1. class B {
  2. private int b;
  3. public int getB() { return b; }
  4. public void setB(int b) { this.b = b; }
  5. }
  6.  
  7. class A {
  8. public static void main (String[] args) {
  9. B b = new B();
  10. b.setB(5);
  11. System.out.println(b.getB());
  12. }
  13. }
  14.  
  15. //https://pt.stackoverflow.com/q/185542/101
Success #stdin #stdout 0.06s 32532KB
stdin
Standard input is empty
stdout
5