Mastering Java 2025 – 400 Free Practice Questions to Pass the 'Thinking in Java' Exam

Question: 1 / 510

How is the address of an object printed using the 'this' keyword inside its toString() method?

Directly using this.toString()

Using super.toString()

B is the correct answer because using the 'super' keyword allows us to access the toString() method of the parent class, which outputs the object's address. Additionally, options A and C are incorrect because they do not utilize the 'super' keyword. Option D is incorrect because System.out.toString() is not a valid method and cannot be used with the 'this' keyword.

Get further explanation with Examzify DeepDiveBeta

By converting 'this' to a string

By utilizing System.out.toString(this)

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy