File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Abstract Class Instance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Abstract Class Instance" Watch "Abstract Class Instance" New topic
Author

Abstract Class Instance

Dean Jones
Greenhorn

Joined: Jun 18, 2002
Posts: 24
can any one of u tell me
is there any way to have the instance of the abstract class.
i dont think so but i was asked this in an interview so there might be...........
Dean Jones
Mohan Panigrahi
Ranch Hand

Joined: Sep 28, 2001
Posts: 142
Hi Dean,
Ofcourse you cannot instantiate an abstract class. But you can use the implementation of an abstract class by extending it.
Here is the code :
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Right. There is no way to instantiate an abstract class. You can have an identifier of the abstract class type, of course.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Abstract Class Instance