Writing Methods

AP Computer Science A· difficulty 3/5

<code>System.out.println(obj)</code> calls

  • A

    obj.show()

  • B

    obj.print()

  • C

    obj.equals("")

  • D

    obj.toString() implicitly

    check_circle

Explanation

<code>println</code> invokes <code>toString()</code> on the object.

Want 10 more like this — adaptive to your weak spots?

Related questions