fork download
  1. public class Main
  2. {
  3. public static void main(String[] args)
  4. {
  5. new Client().run();
  6. }
  7. }
  8.  
  9. class Client {
  10. void run() {
  11. Msg m = new Msg();
  12. new Server().send(m);
  13. System.out.println(m.prop);
  14. }
  15. }
  16.  
  17. class Server {
  18. void send(Msg msg) {
  19. msg.prop = "modified";
  20. }
  21. }
  22. class Msg {
  23. String prop;
  24. }
Success #stdin #stdout 0.03s 245632KB
stdin
Standard input is empty
stdout
modified