Can you have a constructor in abstract class?

Answer Posted / sadiq

Yes. Abstract class can have constructor.
But abstract class cannot be instantiated,how we can call
constructor? Using super()(calls super class constructor) in
the subclass which extends abstract class.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is stack explain?

480


What are the different http methods?

506


What do you mean by chromounits in java8?

506


What happens when you add a double value to a string?

519


What are constants?

579






How to perform selection sort in java?

554


What is a "pure virtual" member function?

577


What is a null point?

533


What does jre stand for?

584


Is 64bit faster than 32 bit?

555


What is math in java?

543


What is the final class modifier?

537


Which methods are used during serialization and deserialization process?

530


Do loops java?

525


Which is better stringbuffer or stringbuilder?

512