Can you have a constructor in abstract class?
Answer Posted / suresh
any class which extends with an object class should have a
constructor whether a class is abstract class or not.
if a abstract class is super class to some sub classes,
then the abstract class should extneds with oject class.
EX: abstract class A{
A{
super(); /// it ll give a call to super class
/// super() we can use only in
constructor
}
}
class B extends A{
}
means any class should extnd with super class.
because of this abstract classes are not 100% abstract.
interface is 100% abstract.
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is finally block?
If a method is declared as protected, where may the method be accessed in java programming?
Explain java coding standards for variables ?
Is string a class in java?
What do you understand by the bean persistent property?
What are internal and external variables?
What is javac_g?
What is exception in java?
What are 4 pillers of object orinted programming?
What is the dot operator?
what is mena by object block any what is the use of that
What is defined as false sharing in the context of multithreading?
What is tcp and udp?
What is the difference between yield() and sleep()?
What is difference between add() and addelement() in vector?