For your example above it doesn't make much sense to provide a static constructor. And normally when you provide a static constructor you should make the normal constructor private. Otherwise it is still possible to create an instance with the normal constructor.
I try to explain here with another example, when you could use static factory methods. One of the advantages is, that you can give the factory methods understandable names.
class Complex {
public static Complex fromCartesian(double real, double imag) {
return new Complex(real, imag);
}
public static Complex fromPolar(double modulus, double angle) {
return new Complex(modulus * cos(angle), modulus * sin(angle));
}
private Complex(double a, double b) {
//...
}
}
Complex c = Complex.fromPolar(1, pi)
Or another example would be the Singleton Pattern. There you wan't to provide only one instance. So this is the reason why you make the constructor private and create an own getInstance method where you make sure, that there is always just one instance available.
public class Singleton {
private volatile static Singleton singleton;
private Singleton() {
}
// synchronized keyword has been removed from here
public static Singleton getSingleton() {
if(singleton==null) {
synchronized(Singleton.class){
if(singleton == null) {
singleton = new Singleton();
}
}
}
return singleton;
}
}
Factory Method Pattern Wikipedia