-5

Possible Duplicate:
Is Java pass by reference?

Let me know the answer soon Please!!!

Community
  • 1
  • 1
JavaSun
  • 58
  • 7

3 Answers3

1

Java doesn't pass method arguments by reference - it passes them by value.

Jon Black
  • 16,223
  • 5
  • 43
  • 42
0

Have a look at this:

http://www.javaworld.com/javaworld/javaqa/2000-05/03-qa-0526-pass.html

Ristovak
  • 491
  • 1
  • 5
  • 10
-5

The Java compiler decides what's best.

Eamorr
  • 9,872
  • 34
  • 125
  • 209
  • What do you mean by that? The Java compiler emits *Java bytecode* and *Java bytecode* has rules governing this. I don't think the compiler has a choice in the matter. – Adam Paynter Nov 27 '10 at 10:32