Originally posted by Stefan Wagner:
That's evidentally false.
Nearly everything is passed by reference, except primitiv types (int, boolean, byte, char, float, ...).
Arrays of primitiv types are passed by reference too.
Stefan,
This an honest mistake from your part.
But it IS a mistake.
A mistake that many programmers are doing though, so don't beat yourself :-)
I repeat, very loud and clear:
In JAVA, everything is passed by value. It's as simple as that.
And there is absolutely NO exception whatsoever.
You should read the following
from JavaRanch Campfire.
Cheers
JFB