Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. 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 | |||||||||||
Help us improve. Please let us know the company, where you were asked this question : | |||||||||||
Like Discuss Correct / Improve  overloading  abstract methods  overloading abstract methods | |||||||||||
| |||||||||||
Ans. Compile Time Error: Unhandled exception type Exception | |||||||||||
Help us improve. Please let us know the company, where you were asked this question : | |||||||||||
Like Discuss Correct / Improve  java   code   coding   overridding   late binding   exception handling   abstract class   abstract methods | |||||||||||
| |||||||||||
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. | |||||||||||
Help us improve. Please let us know the company, where you were asked this question : | |||||||||||
Like Discuss Correct / Improve  java   oops   abstract class   abstract methods   java compilation error | |||||||||||
| |||||||||||
Ans. No. This will give a compilation error saying "Abstract methods do not specify a body". | |||||||||||
Help us improve. Please let us know the company, where you were asked this question : | |||||||||||
Like Discuss Correct / Improve  java   abstract classes   abstract methods   java compilation error   java coding   java code   coding   yes-no | |||||||||||
| |||||||||||
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. | |||||||||||
Help us improve. Please let us know the company, where you were asked this question : | |||||||||||
Like Discuss Correct / Improve  overriding  abstract methods  overriding abstract methods | |||||||||||
| |||||||||||
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. | |||||||||||
Help us improve. Please let us know the company, where you were asked this question : | |||||||||||
Like Discuss Correct / Improve  overriding  overriding abstract methods  abstract methods | |||||||||||
| |||||||||||