Last active
June 22, 2021 12:41
This file contains 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
public class Practice { | |
public static void main(String[] args) { | |
int num = 10; | |
calA(num); | |
System.out.println(num); // 10が出力されます | |
} | |
public static void calA(int num) { | |
num += 10; | |
System.out.println(num); // 20が出力されます | |
} | |
/*実行結果 | |
20 | |
10 | |
*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment