Multiple choice technology programming languages

Is the following statement true or false. As the toString method is defined in the Object class, System.out.println can be used to print any object.

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Every class in Java inherits from the Object class, which defines the toString() method. Because of this, any object passed to System.out.println() can be printed, as the method automatically invokes the object's toString() representation.