import Box; class BoxExample { public static void main (String[] args) { Box myFirstBox = new Box(); myFirstBox.setWidth (7.5); double w = myFirstBox.getWidth(); System.out.println ("Antes de llamar al método: w = " + w + " width = " + myFirstBox.getWidth()); BoxExample ex = new BoxExample (); ex.doubleWidth (w, myFirstBox); System.out.println ("Después de llamar al método: w = " + w + " width = " + myFirstBox.getWidth()); } void doubleWidth (double w, Box b) { w = w * 2; b.setWidth (w); System.out.println ("Dentro del método: w = " + w + " width = " + b.getWidth()); } }