I wonder why java defines homogeneous methods in two distinct classes: java.util.regex.Pattern and java.util.regex.Matcher.
For example split method defined in Pattern class and replaceAll method defined in Matcher class. I think these two methods are homogeneous, why are they not defined in the same class?
Have I understood it wrong?
By "homogenous", I mean: split and replaceAll methods are utilities for String, why not defined in a class?
splitandreplaceAllmethods are utilities for string, why not defined in a class?