Can u write constructor in abstract.If yes den when it will
be invoked.

Answers were Sorted based on User's Feedback



Can u write constructor in abstract.If yes den when it will be invoked...

Answer / murli

yes..it will be invoked when the child class extending the abstract class is instantiated

Is This Answer Correct ?    16 Yes 1 No

Can u write constructor in abstract.If yes den when it will be invoked...

Answer / srinu

yes Abstract class contain constructor. if it will be
invoked the abstract class extending the class .Then that be
invoked.
Ex:
HttpServlet class is abstract class it contain
constructor.it will be invoked the other class extending
HttpServlet it will be invoked.

Is This Answer Correct ?    13 Yes 2 No

Can u write constructor in abstract.If yes den when it will be invoked...

Answer / ravi jain

Question is not properly defined!
U r asking abt

1. Contructor's modifier
2. constructor in abstract class

if(2nd)
{
than answer 1 & 2 are correct
}
else if (1st)
{
than answer 3rd is correct
}

Is This Answer Correct ?    2 Yes 1 No

Can u write constructor in abstract.If yes den when it will be invoked...

Answer / chaitali chari

You cannot have a abstract constructor. If you declare a
constructor as abstract then it would give any error while
compilation saying abstract modifier not allowed.

Is This Answer Correct ?    3 Yes 18 No

Post New Answer

More Core Java Interview Questions

What is default specifier ??? Use of default specifier ???

4 Answers   Cognizant, Syntel,


What are filterstreams?

0 Answers  


How can you reverse a string?

8 Answers  


Can one thread block the other thread?

0 Answers  


How to sort array in descending order in java?

0 Answers  






what is the role of xml in core java?? and how we can use it?? can somebody give a sample program with explanation and from where i can read more about xml?????

0 Answers   HCL, SAP Labs, Vital Soft,


What is the use of default method in interface in java?

0 Answers  


what is difference betweem home interface and remote interface?

0 Answers   CTS, HCL,


Java run-time system generates What class of exceptions?

2 Answers   TCS,


How can constructor chaining be done using this keyword?

0 Answers  


When throws keyword is used?

0 Answers  


What is boolean data type in java?

0 Answers  


Categories