Skip to content
Sharp

Object-oriented programming · interview question

Which Java keyword would you use to refer to the current object within an instance method?

Multiple choiceEasychapter-2-curatedpremiumoopfields-and-state
Choose one answer
Answer and explanation

Correct answer

C. This

Why

The 'this' keyword is used within an instance method to refer to the current object. It is often used to distinguish between instance fields and parameters with the same name.

Test yourself on Object-oriented programming

A free test with instant, explained results. No account needed.

Start free test
All Object-oriented programming questions →