Soru
TopHat Question Which color-code I segment of this program is incorrect? A. public interface Colorable [ public Color getColor('it B. return Color.PINK; C. public class Rectangle implements colorable i constructor elided D. ooverride public Color getColor() E. return Color.RFD; Join Code: 316
Çözüm
4.5
(150 Oylar)
Nurettin
Gelişmiş · 1 yıl öğretmeni
Uzman doğrulaması
Cevap
The incorrect color-code I segment of this program is:C. public class Rectangle implements Colorable {constructor elided}The correct implementation should be:public class Rectangle implements Colorable { private Color color; public Rectangle() { this.color = Color.PINK; } @Override public Color getColor() { return this.color; }}