title: Why does Java Pattern class use a factory method rather than constructor?
body: <p>There's a good discussion of this in the <a href="https://stackoverflow.com/questions/628950/constructors-vs-factory-methods">general case</a>.</p>
  
  <p>However, I was wondering specifically why the <a href="https://docs.oracle.com/javase/9/docs/api/java/util/regex/Pattern.html" rel="nofollow noreferrer"><code>Pattern</code></a> class uses the <a href="https://docs.oracle.com/javase/9/docs/api/java/util/regex/Pattern.html#compile-java.lang.String-" rel="nofollow noreferrer"><code>compile</code></a> static method to create an object, rather than the constructor?</p>
  
  <p>Seems to me to be more intuitive to use a constructor.</p>