Monday 13 July 2015

Passing Arguments To Methods In Java


Variables are always passed by copy in Java. This is an unchanging rule of the language, but one that can be easily misinterpreted when running code.

Take the following example, which you should place in a package called "misc":