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 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "abstract class" Watch "abstract class" New topic
Author

abstract class

Amol Dongre
Greenhorn

Joined: Sep 17, 2010
Posts: 11
why abstract class allow private constructor when abstract class can not be instantiated and private constructor can not be called through super() in subclasses
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43381
    
  32
Amol Dongre
Greenhorn

Joined: Sep 17, 2010
Posts: 11
Campbell Ritchie wrote:


not clear can you explain it briefly
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43381
    
  32
You can call the private constructor from the public constructor. Another version of the same thingIt is possible to use a private constructor from within the class. In an abstract class, that is probably only useful if called from a non-private constructor. Agreed, it is not something you will want at all frequently.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: abstract class
 
jQuery in Action, 3rd edition