Answer Posted / aditya ganjiwale
Its there to be able to initialize the abstract class
internal state.
Lets say you would like to assign two variables, you would
have to do this for every implementation, but with
constructors in the abstract class you only need it once:
So every class inheriting only needs to call the
constructor, instead of assigning the values themself every
time.
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Write a method to check if input string is palindrome?
how can you catch multiple exceptions in java?
What is stringjoiner ?
What is the main method java?
Will the compiler creates a default constructor if I have a parameterized constructor in the class?
What do you understand by looping in java? Explain the different types of loops.
Why enumeration is faster than iterator?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread
Why stringbuilder is not thread safe?
Which is better stringbuilder or stringbuffer?
What ide should I use for java?
What is the purpose of skeleton and stub?
What is functional interface in javatpoint?
Explain methods specific to list interface?
What are the differences between path and classpath variables?