This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons 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: 38107
    
  22
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: 38107
    
  22
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: abstract class
 
Similar Threads
Abstract class with private constructor (why compiles if I can't extend)?
final and abstract
Abstract class and private constructor
Employee class - Abastract Vs Interface
access modifier for an abstract class