Skip to content
Sharp

Object-oriented programming · interview question

What keyword is used to refer to the current object within an instance method?

Multiple choiceEasychapter-2-curatedpremiumoopinstance-methods
Choose one answer
Answer and explanation

Correct answer

C. This

Why

The 'this' keyword in Java is used within an instance method to refer to the current object's variables and methods. It is a way to access the current object's context.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →