Welcome Guest | Sign in | Register
Abstract - Discussion Page For Q.2463 | Java Programming Questions and Answers | Java Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Abstract > Questions and Answers

Q: Abstract class Foo {
Abstract Foo ( );
}

Can we declare constructor as abstract?
A. Yes B. No
C. Cannot be determined D. None of the above

Answer and Explanation

Answer:No

Explanation:
Abstract methods will not have implementation. If you want to implement then you should do it through the child class. Here in the example, constructor Foo( ) is declared as abstract.

Actually constructors are not inherited to child class, constructor are specific to class if you try to make constructor as abstract then it will throw an compile time error.

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.