> Why is it possible to use public,protected,private and no (package) in
> constructors. Surely the access is defined in the class declaration?
>
> TIA, Simon.
Because sometimes you need those options:
Suppose you want to have a class that everyone can use (a public class).
But, there's one thing: only one instance should ever be created (aka
singleton).
Now, if the constructors were public, anyone would be able to create any
number of instances, so you wouldn't be able to enfore the single instance
rule.
Now consider the following case:
public final class Singleton {
private static Signleton instance = new Singleton;
private Singleton() {
//create object
}
public static Singleton getInstance() {
return instance;
}
}
By making the constructor private, we are now able to enfore that only one
instance of this class is created.

Signature
Kind regards,
Christophe Vanfleteren