Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the use of Creating constructor for Abstarct Classes

 
shivakumar paka
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any one please tell me what is the use of creating constructor for abstract class.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

1. you can not instantiate abstract class.

2.when you instantiate a class(which is extends the Abstract class)..constructor calls it super class constructor .. that is the reason abstract class has constructor....

Hope it will help you

Thanks & Regards,
seetharaman.v
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ShivKumar,

Welcome to the JavaRanch.
This topic will definitely clear your confusion.
I suggest you to search little bit into the old topics. It is very likely to get solution to your problem.

[Corrected the link]
[ May 26, 2008: Message edited by: Vishal Pandya ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic