Practice
Perhaps you would like to practice?
Assume that each row is independent of the others.
| code section | pointA == pointB | pointA.equals( pointB ) |
Point pointA = new Point( );
Point pointB = new Point( 0, 0 );
|
|
|
Point pointA = new Point( 21, 17 );
Point pointB = pointA;
|
|
|
Point pointA = new Point( 21, 17 );
Point pointB = new Point( 7*3, 20-3 );
|
|
|
Point pointA = new Point( 21, 17 );
Point pointB = new Point( pointA );
|
|
|
Point pointA = new Point( 21, 17 );
Point pointB = new Point( 21, 17 );
pointA.move( 8, 12 );
|
|
|
|