1.

What is the syntax for using abstract method?(a) abstractmethod_name (parameter)(b) absmethod name (parameter)(c) abstract return-type method name (parameter)(d) abstract method name (parameter)I got this question in semester exam.This intriguing question comes from Abstract Function in section Member Functions & its Types of Object Oriented Programming

Answer»

Right ANSWER is (a) abstractmethod_name (parameter)

The BEST explanation: The syntax must firstly contain the access modifier. Then the keyword abstract is written to mention clearly to the compiler that it is an abstract METHOD. Then PROTOTYPE of the function with return type, function NAME and parameters.



Discussion

No Comment Found

Related InterviewSolutions