Question: Here are three overloaded constructors for a class named Rect 2 D . public Rect 2 D ( ) { this.x = 0 . 0
Here are three overloaded constructors for a class named RectD
public RectD
this.x ;
this.y ;
this.color Color.RED;
public RectDColor c
this.x ;
this.y ;
this.color c;
public RectDdouble x double y Color c
this.x y;
this.y x;
this.color c;
I instantiate a few versions of the class as follows:
RectD square new RectD;
RectD square new RectDColorBLUE;
RectD square square;
Which of the following statements are guaranteed to be true based on the given information?
Question options:
square square
square square
Two out of three squares are RED
Two out of three squares are BLUE
square is BLUE
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
