Created
July 7, 2022 15:16
-
-
Save vinimonteiro/1fc3a701ad77b4afb06d97db718c9fbf to your computer and use it in GitHub Desktop.
Pass by value primitive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vinimo; | |
public class App { | |
public static void main(String[] args) { | |
int foo = 1; | |
modify(foo); | |
System.out.println(foo); | |
} | |
public static void modify(int foo) { | |
foo = 5; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment