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 abtract class object is not created Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "abtract class object is not created" Watch "abtract class object is not created" New topic
Author

abtract class object is not created

Pramod P Deore
Ranch Hand

Joined: Jul 15, 2008
Posts: 629

if we extends the abstract class and provide the implementation for the methods which are declared in abstract class.And then we create the object of that subclass. then at that time default constructor of that subclass is called and we pass 'super' in the constructor of that subclass then it call the constructor of super class? is there is any object create of abstract class?


Life is easy because we write the source code.....
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Originally posted by pramod deodeore:
if we extends the abstract class and provide the implementation for the methods which are declared in abstract class.And then we create the object of that subclass. then at that time default constructor of that subclass is called and we pass 'super' in the constructor of that subclass then it call the constructor of super class? is there is any object create of abstract class?


What you explain is correct, but there is no object created for abstract class. Constructors are made to initialize the instance variable, though of that base abstract class too..


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36482
    
  16
The way I think of it, which might not be accurate, is that every object has a "part" which is inherited from its superclass. So every object has a toString() method inherited from java.lang.Object.
The super() call (explicit or implicit) sets up that "part."
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: abtract class object is not created
 
Similar Threads
Abstract class constructor.
Abstract class (constructor issue)
Can i have a private constructor in an abstract class
GenericServlet with constructor
Use of constructor in abstract class?