Search Interview Questions | ![]() ![]() Click here and help us by providing the answer. ![]() Click Correct / Improve and please let us know. |
|
| |||||||||||
Core Java - Interview Questions and Answers for 'Abstract methods' - 6 question(s) found - Order By Newest | |||||||||||
| |||||||||||
Ans. Yes | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() | |||||||||||
| |||||||||||
Ans. Compile Time Error: Unhandled exception type Exception | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() | |||||||||||
| |||||||||||
Ans. No. It will give the compilation error saying "The abstract method test in type BuggyBread1 can only be defined by an abstract class". We need to declare the class abstract for it to have any abstract method. | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() | |||||||||||
| |||||||||||
Ans. No. This will give a compilation error saying "Abstract methods do not specify a body". | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() | |||||||||||
| |||||||||||
Ans. Abstract methods are the methods that need to be overridden in the derived class ( either as implementing method or again abstract method ) so it's not only allowed but its required to override abstract method in the derived class. | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() | |||||||||||
| |||||||||||
Ans. Yes, but in that case the derived class itself should be abstract. We cannot have an object of a class without definition for the method which has been declared abstract in the parent. | |||||||||||
![]() | |||||||||||
![]() ![]() ![]() | |||||||||||
| |||||||||||