Can you have a constructor in abstract class?

Answer Posted / ranjan

We can write a method name same as class which is called
constructor in the abstract class , but as a abstract class
can not be instanciated so that method used as a general
method.

but no error would be there...

Is This Answer Correct ?    31 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When is an object subject to garbage collection?

588


Explain purpose of sleep() method in java?

618


What is the use of System class?

612


What is a java applet? What is an interface?

635


What is exception in java?

569






What is the size of an array?

553


Does substring create a new object?

530


Is a class subclass of itself?

604


Is java programming easy?

545


What do you mean by platform independence? What is an interface?

563


What is finally block?

566


Which method cannot be overridden in java?

603


Why does java not support operator overloading?

660


What is the difference between the Reader/Writer class hierarchy and the InputStream/OutputStream class hierarchy?

625


Explain about transient variables in java?

645