Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package passByReference;
- public class blah {
- public static void main(String[] args) {
- passByReference value = new passByReference(2);
- System.out.println(value.value);
- changeValueByReference(value);
- System.out.println(value.value);
- }
- private static void changeValueByReference(passByReference val) {
- val.value = 5;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement