Question 57Asked in Bihar STET Paper 2 Computer Science (Class 11-12), 12 Sep 2023, Shift 1 + 1 more paper

What is the purpose of the "super" keyword in Java and other similar languages?जावा और अन्य समान लैंग्वेज में "super" कीवर्ड का उद्देश्य क्या होता है?

जावा और अन्य समान लैंग्वेज में "super" कीवर्ड का उद्देश्य क्या होता है?
  1. AIt refers to the superclass in inheritanceयह इनहेरिटेंस में सुपरक्लास को संदर्भित करता है।
  2. BIt creates a new object instanceयह एक नया ऑब्जेक्ट इंस्टेंस बनाता है।
  3. CIt defines a new classयह एक नये क्लास को परिभाषित करता है।
  4. DIt handles exceptionsयह एक्सेप्शन को हैंडल करता है।
Show answerHide answer

Correct answer: (A) It refers to the superclass in inheritanceयह इनहेरिटेंस में सुपरक्लास को संदर्भित करता है।

Explanation

"super" refers to the immediate parent class. It is used to call the parent's constructor or methods and to access the parent's fields."super" निकटतम पैरेंट क्लास को संदर्भित करता है। इसका उपयोग पैरेंट का कंस्ट्रक्टर या मेथड कॉल करने और पैरेंट के फील्ड तक पहुँचने के लिए होता है।

From Bihar STET Paper 2 Computer Science (Class 11-12) PYQ, 12 Sep 2023, Shift 1

This is question 57 of Bihar STET Paper 2 Computer Science (Class 11-12) PYQ, 12 Sep 2023, Shift 1. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.

Asked in 2 papers