18 lines
199 B
Text
Executable file
18 lines
199 B
Text
Executable file
// test that call-by-value is used
|
|
|
|
|
|
class Main {
|
|
void main() {
|
|
int[] y;
|
|
int x;
|
|
y = new int[5];
|
|
y[2] = 50;
|
|
aux(y);
|
|
x = y[2];
|
|
write(x);
|
|
}
|
|
|
|
void aux (int[] arg){
|
|
arg[2] = 100;
|
|
}
|
|
}
|