@@ -0,0 +1,1019 @@
+package study.hard.javalib.nativelib;%0A%0Apublic class CallByReferenceVSCallByValueTest2 %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09User user = new User(%22James%22);%0A%09%09System.out.println(%221) An user in the main: %22 + user.getName());%0A%09%09foo(user);%0A%09%09System.out.println(%224) An user in the main: %22 + user.getName());%0A%09%09bar(user);%0A%09%09System.out.println(%227) An user in the main: %22 + user.getName());%0A%09%7D%0A%0A%09private static void foo(User user) %7B%0A%09%09System.out.println(%222) An user in the foo: %22 + user.getName());%0A%09%09user = new User(%22Tomas%22);%0A%09%09System.out.println(%223) An User in the foo: %22 + user.getName());%0A%09%7D%0A%0A%09private static void bar(User user) %7B%0A%09%09System.out.println(%225) An user in the foo: %22 + user.getName());%0A%09%09user.setName(%22Bill%22);%0A%09%09System.out.println(%226) An User in the foo: %22 + user.getName());%0A%09%7D%0A%0A%09private static class User %7B%0A%09%09private String name;%0A%0A%09%09public User(String name) %7B%0A%09%09%09this.name = name;%0A%09%09%7D%0A%0A%09%09public String getName() %7B%0A%09%09%09return name;%0A%09%09%7D%0A%0A%09%09public void setName(String name) %7B%0A%09%09%09this.name = name;%0A%09%09%7D%0A%09%7D%0A%7D%0A

Add a class to test both 'call by reference' with 'call by value'.