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

instantiation

 
sandeep Talari
Ranch Hand
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can't we instatiate the abstract class or not...
some where i read that we can do but when i tried it its not working
can somebody help me
 
Jesus Angeles
Ranch Hand
Posts: 2068
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, you can never instantiate an abstract class.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot directly instantiate an abstract class. However, you can instantiate a concrete subclass and upcast the reference to the abstract type. For example...
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic