previous | start | next

## No Reference Parameters

- Java has no "call by reference"

-     public void copyLengthTo(int n)
      {
       n = name.length();
      }
      public void copyGreeterTo(Greeter other)
      {
       other = new Greeter(name);
      }

- Neither call has any effect after the method returns

      int length = 0;
      worldGreeter.copyLengthTo(length); // length still 0
      worldGreeter.copyGreeterTo(daveGreeter) // daveGreeter unchanged

previous | start | next