Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class HelloWorld
- {
- public static void main(String[] args)
- {
- Blub blub = new Blub();
- blub.x = 8;
- yolo(blub);
- System.out.println(blub.x);
- bar(blub);
- System.out.println(blub.x);
- }
- private static void yolo(Blub blub){
- blub = new Blub();
- System.out.println(blub.x);
- }
- private static void bar(Blub blub){
- blub.x = 1337;
- }
- }
- class Blub
- {
- public int x = 42;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement