File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can an abstract class contain a constuctor?

 
Tan Richards
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm new to Java and in the procees of learning.Can u plz answer the question for me with some explanation if possible?
 
A Kumar
Ranch Hand
Posts: 980
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Yes you can have constructors in abstract class..
but you cant instantiate the abstract class....

Ex: AbstractClassA ab=new AbstractClassA();

where AbstractClassA is an abstract class.



But you cant have constructor in interface..

hope you got it...
[ September 29, 2005: Message edited by: A Kumar ]
 
Tan Richards
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, thank you
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic