19 lines
201 B
Text
19 lines
201 B
Text
|
// test that call-by-value is used
|
||
|
|
||
|
|
||
|
class Main {
|
||
|
void main() {
|
||
|
int[] y;
|
||
|
int x;
|
||
|
y = new int[5];
|
||
|
y[2] = 50;
|
||
|
aux(y[2]);
|
||
|
x = y[2];
|
||
|
write(x);
|
||
|
}
|
||
|
|
||
|
void aux (int arg){
|
||
|
arg = arg + 1;
|
||
|
}
|
||
|
}
|