What is the location of pointB
after the following:
pointB.move( 24-12, 34*3 - 45 );
pointB
will now be located at x = 12, y = 57.
You probably did the right thing to get the answer, but let us go through it again, just to be sure:
pointB.move( 24-12, 34*3 - 45 ); is equivalent to: pointB.move( 12, 34*3 - 45 ); is equivalent to: pointB.move( 12, 102 - 45 ); is equivalent to: pointB.move( 12, 57 );
At this point, the move()
method starts running with the two
int
values
it requires.
The expressions in the parameter list are evaluated before the method starts running. The resulting values should be the data type expected by the method, or a data type that can be converted to that type.