Suppose r contains a reference to a new Rectangle(5, 10, 20, 30). Which of the following assignments

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 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;

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question
Question Posted: