?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Easy

Override toString Method from Object Class

APCSA-ENLDPW

A programmer is creating a Frog class and wants to override the toString method from the Object class.

Which of the following class declaration statements would be appropriate?

I.    public class Frog
II.   public class Frog extends Object
III.  public class Frog implements Object
A

I only.

B

II only.

C

III only.

D

I and II only.

E

I and III only.