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

Can we change the value of static variable?

708


What isan abstract class and when do you use it?

1184


Is string a class?

747


Is intellij better than eclipse?

762


What is the gregoriancalendar class in java programming?

784


What environment variables are required to be set on a machine in order to run Java programs?

863


What is passing parameters in java?

729


What is mean by exception?

749


How do you access command-line arguments within the code?

802


What is backdrop?

807


What are the basic interfaces of java collections framework?

836


What is static keyword?

783


there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.

1775


What is the difference between throw and throws keywords?

810


What is a boolean expression in java?

768