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

Explain working of call by reference function invoking.

803


How do I remove a character from a string in java?

729


What is the use of arraylist in java?

806


what happens when a thread cannot acquire a lock on an object? : Java thread

838


Can java inner class be static?

768


How do you detect memory leaks?

795


What is static variable with example?

784


What’s the difference between constructors and other methods?

772


What is the difference between hashmap and hashtable? What is an interface?

807


What is the default value of the local variables?

725


What is set and get methods in java?

755


What is a two-pass assembler?

816


What is the function of log?

741


what is the purpose of the runtime class?

808


How to find the index of the largest number in an arraylist java?

747