Can you have a constructor in abstract class?
Answer Posted / abdul hannan
Yes. We can have constructor in an abstract class but we can
not directly instantiate it. If the abstract class have no
argument constructor, it will automatically call by the
constructor of subclass through constructor chaining. If
abstract class have constructor with argument, then we need
to call it by super() and pass the argument in it.
Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Can arraylist contain null values?
What are the ways to instantiate the class class?
Explain what are final variable in java?
What is an i/o filter?
Can I learn java without any programming experience?
What is comparator in java?
Is null an object java?
How do you call a reference in java?
What are the steps that are followed when two computers connect through tcp?
What are keywords and reserved words in java?
Explain about public and private access specifiers?
What is the difference between stringbuffer and stringbuilder class?
How do you use equal in java?
What is mnemonic in assembly language?
Why java is called not pure object oriented language?