Question: Suppose r contains a reference to a new Rectangle(5, 10, 20, 30). Which of the following assignments is legal? (Look inside the API documentation to
Suppose r contains a reference to a new Rectangle(5, 10, 20, 30). Which of the following assignments is legal? (Look inside the API documentation to check which interfaces the Rectangle class implements.)
a. Rectangle a = r;
b. Shape b = r;
c. String c = r;
d. ActionListener d = r;
e. Measurable e = r;
f. Serializable f = r;
g. Object g = r;
Step by Step Solution
3.46 Rating (159 Votes )
There are 3 Steps involved in it
The Rectangle class is part of the Java AWT Abstract Window Toolkit package Heres the legality of yo... View full answer
Get step-by-step solutions from verified subject matter experts
