In OOP, what is the purpose of the "this" keyword?ओओपी में, "इस" कीवर्ड का उद्देश्य क्या है?
ओओपी में, "इस" कीवर्ड का उद्देश्य क्या है?
Show answerHide answer
Correct answer: (D) To refer to the current instance of a classएक वर्ग के वर्तमान उदाहरण को संदर्भित करना
Explanation
In OOP, 'this' is a reference to the current object, the instance whose method is running. It is used, for example, to tell fields apart from parameters with the same name.OOP में 'this' वर्तमान ऑब्जेक्ट का संदर्भ है, यानी वह instance जिसका method चल रहा है। इसका उपयोग, उदाहरण के लिए, उसी नाम वाले fields और parameters में अंतर करने के लिए होता है।