Referring to the FeedReaderContract class on Android Developers page:
The code starts as:
public final class FeedReaderContract {
// To prevent someone from accidentally instantiating the contract class,
// give it an empty constructor.
public FeedReaderContract() {}
i.e. there is a default public constructor for the class.
- Is that code comment correct?
- How does a
publicempty constructor prevent instantiation - should this maybe beprivate?
... am I still half asleep ? ...
PS I'm not concerned about the rest of the example, or how to use it. I am purely trying to confirm that I'm not going mad and stupid at the same time...