

MCQOPTIONS
Saved Bookmarks
This section includes 56 Mcqs, each offering curated multiple-choice questions to sharpen your Java Programming knowledge and support exam preparation. Choose a topic below to get started.
51. |
A method which is declared as abstract and does not have implementation is known as an _____________? |
A. | Abstract Interface |
B. | Abstract Thread |
C. | Abstract List |
D. | abstract Method |
Answer» E. | |
52. |
A class which is declared with the ________ keyword is known as an abstract class in Java. |
A. | abstract |
B. | util |
C. | extends |
D. | None of the above |
Answer» B. util | |
53. |
Abstract class can have constructors and static methods? |
A. | True |
B. | False |
C. | Abstract class can have constructors but can not have static methods. |
D. | Abstract class can not have constructors but can have static methods. |
Answer» B. False | |
54. |
An abstract class can have a data member, abstract method, method body (non-abstract method), constructor, and even main() method. |
A. | True |
B. | False |
C. | May be True or False |
D. | Can't Say |
Answer» B. False | |
55. |
What will be output for the folllowing code? |
A. | Compilation error in Line 1(abstract method cannot be private) |
B. | Compilation error in Line 2(abstract class cannot have concrete method) |
C. | Compilation error in Line 3(abstract class cannot be extended) |
D. | Compilation error in Line 4(deposit method should have public access modifier) |
Answer» B. Compilation error in Line 2(abstract class cannot have concrete method) | |
56. |
What is the stored in the object obj in following lines of code?box obj; |
A. | Memory address of allocated memory of object |
B. | |
C. | Any arbitrary pointer |
D. | Garbage |
Answer» C. Any arbitrary pointer | |