

MCQOPTIONS
Saved Bookmarks
This section includes 15 Mcqs, each offering curated multiple-choice questions to sharpen your Object Oriented Programming knowledge and support exam preparation. Choose a topic below to get started.
1. |
The abstract method definition can be made ___________ in derived class. |
A. | Private |
B. | Protected |
C. | Public |
D. | Private, public, or protected |
Answer» E. | |
2. |
The abstract methods can never be ___________ in a base class. |
A. | Private |
B. | Protected |
C. | Public |
D. | Default |
Answer» B. Protected | |
3. |
Which among the following is correct for abstract methods? |
A. | It must have different prototype in the derived class |
B. | It must have same prototype in both base and derived class |
C. | It must have different signature in derived class |
D. | It must have same return type only |
Answer» C. It must have different signature in derived class | |
4. |
Static methods can’t be made abstract in java. |
A. | True |
B. | False |
Answer» B. False | |
5. |
If a function declared as abstract in base class doesn’t have to be defined in derived class then ______ |
A. | Derived class must define the function anyhow |
B. | Derived class should be made abstract class |
C. | Derived class should not derive from that base class |
D. | Derived class should not use that function |
Answer» C. Derived class should not derive from that base class | |
6. |
What is the syntax for using abstract method? |
A. | <access-modifier>abstract<return-type>method_name (parameter) |
B. | abs<return-type>method name (parameter) |
C. | <access-modifier>abstract return-type method name (parameter) |
D. | <access-modifier>abstract <returning> method name (parameter) |
Answer» B. abs<return-type>method name (parameter) | |
7. |
What is this feature of enforcing definitions of abstract function at compile time called? |
A. | Static polymorphism |
B. | Polymorphism |
C. | Dynamic polymorphism |
D. | Static or dynamic according to need |
Answer» D. Static or dynamic according to need | |
8. |
The abstract function definitions in derived classes is enforced at _________ |
A. | Runtime |
B. | Compile time |
C. | Writing code time |
D. | Interpreting time |
Answer» C. Writing code time | |
9. |
It is ____________________ to define the abstract functions. |
A. | Mandatory for all the classes in program |
B. | Necessary for all the base classes |
C. | Necessary for all the derived classes |
D. | Not mandatory for all the derived classes |
Answer» D. Not mandatory for all the derived classes | |
10. |
How are abstract functions different from the abstract functions? |
A. | Abstract must not be defined in base class whereas virtual function can be defined |
B. | Either of those must be defined in base class |
C. | Different according to definition |
D. | Abstract functions are faster |
Answer» B. Either of those must be defined in base class | |
11. |
Which among the following best defines the abstract methods? |
A. | Functions declared and defined in base class |
B. | Functions only declared in base class |
C. | Function which may or may not be defined in base class |
D. | Function which must be declared in derived class |
Answer» C. Function which may or may not be defined in base class | |
12. |
IF_A_FUNCTION_DECLARED_AS_ABSTRACT_IN_BASE_CLASS_DOESN‚ÄÖ√Ñ√∂‚ÀÖ√Ë‚ÀÖ¬•T_HAVE_TO_BE_DEFINED_IN_DERIVED_CLASS_THEN_______?$# |
A. | Derived class must define the function anyhow |
B. | Derived class should be made abstract class |
C. | Derived class should not derive from that base class |
D. | Derived class should not use that function |
Answer» C. Derived class should not derive from that base class | |
13. |
Static_methods_can’t_be_made_abstract_in_java.$# |
A. | True |
B. | False |
Answer» B. False | |
14. |
If a class have all the abstract methods the class will be known as ___________ |
A. | Abstract class |
B. | Anonymous class |
C. | Base class |
D. | Derived class |
Answer» B. Anonymous class | |
15. |
Which_among_the_following_is_correct_for_abstract_methods? |
A. | It must have different prototype in the derived class |
B. | It must have same prototype in both base and derived class |
C. | It must have different signature in derived class |
D. | It must have same return type only |
Answer» C. It must have different signature in derived class | |