fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Main
  6. {
  7. static class A {
  8. private int x;
  9. A(int x) {
  10. this.x = x;
  11. }
  12. void m(A other) {
  13. System.out.println(other.x);
  14. }
  15. }
  16. public static void main (String[] args) throws java.lang.Exception
  17. {
  18. A foo = new A(1);
  19. A bar = new A(2);
  20. foo.m(bar);
  21. }
  22. }
Success #stdin #stdout 0.05s 4386816KB
stdin
Standard input is empty
stdout
2