More about Objects and Classes

24. Fun Activity!


Answer:

Yes. See some of the questions below.

    Fun Activity!

    (otherwise known as more practice)

    Assume that each row is independent of the others.

    code sectionpointA == pointBpointA.equals( pointB )pointB == pointCpointB.equals( pointC )
    Point pointA = new Point( 0, 0 );
    Point pointB = new Point( 0, 0 );
    Point pointC = new Point( 0, 0 );
    
    Point pointA = new Point( 13, -15 );
    Point pointB = pointA;
    Point pointC = pointA;
    
    Point pointA = new Point( 13, -15 );
    Point pointB = pointA;
    Point pointC = pointB;
    
    Point pointA = new Point( 13, -15 );
    Point pointB = pointA;
    Point pointC = new Point( 13, -15 );
    
    Point pointA = new Point( 13, -15 );
    Point pointB = pointA;
    Point pointC = pointB;
    pointA.move( 8, 12 );
    
    Point pointA = new Point( 13, -15 );
    Point pointB = pointA;
    Point pointC = new Point( 13, -15 );
    pointA.move( 8, 12 );
    

    Question 24:

    Do you imagine that professional programmers ever get == and equals confused?