why abstract class will have a constructor?

Answer Posted / ram

Abstract class have the constructor in it just to instantiate its instance variables. Where as Interfaces are not containing any instance variables. That is why, they dont have constructor concept.

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 meant by method?

579


What is the purpose of the return statement?

519


Explain the term virtual machine?

592


how to deploy tomcatserver to weblogic server? write d following steps?

1451


Is ++ operator thread-safe in java?

636






Difference between this() and super() in java ?

617


What's the difference between int and integer in java?

538


What is double parsedouble in java?

550


Is class forname reflection?

520


What is split return?

493


What are the uses of synchronized keyword?

558


Can constructor be synchronized?

543


Can we convert stringbuffer to string?

566


What is covariant return type?

644


Can an interface have a class?

567