X677: Is Square

Given a rectangle r, return true if the rectangle is a square. That is, if the width of r equals the height then the rectangle is a square.

Examples:

isSquare(new Rectangle(35,70,100,100)) -> true

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.