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
Describe how to implement singleton design pattern in struts.
When should we create our own custom exception classes?
What is a ?
Why Java is not pure Object Oriented language?
How do I get the | symbol on my keyboard?
What's the purpose of static methods and static variables?
Can a method be static?
Why unicode is important?
Why is stringbuffer not immutable?
Is vector thread safe in java?
Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.
What is the difference between path and classpath variables?
How to use arraylist in java netbeans?
Explain the available thread states in a high-level?
How does regex work?