a java question

z0mb13

Lifer
May 19, 2002
18,106
1
76
if u pass an array to a method, is it pass by value or pass by reference??? (if the array is modified in that method, will it be modified in the caller function??)
 

manly

Lifer
Jan 25, 2000
13,075
3,832
136
Only primitives are passed by value in Java.

Arrays are first-class objects in Java, thus reference types.