Which type of method does not have an implementation in the base class and must beकिस प्रकार की विधि का आधार वर्ग में कार्यान्वयन नहीं है और इसे व्युत्पन्न वर्गों द्वारा ओवरराइड किया
Which type of method does not have an implementation in the base class and must be
overridden by derived classes?
किस प्रकार की विधि का आधार वर्ग में कार्यान्वयन नहीं है और इसे व्युत्पन्न वर्गों द्वारा ओवरराइड किया
जाना चाहिए?
Show answerHide answer
Correct answer: (B) Abstract methodसार विधि
Explanation
An abstract method is only declared in the base class, with no body, and every concrete derived class must override it. A virtual method has a default implementation that may optionally be overridden.Abstract मेथड केवल base क्लास में घोषित होती है, बिना body के, और हर concrete व्युत्पन्न क्लास को उसे override करना पड़ता है। Virtual मेथड का डिफ़ॉल्ट कार्यान्वयन होता है जिसे वैकल्पिक रूप से override किया जा सकता है।