Java offers a significant amount of ready to use sorting algorithms. Arrays can be sorted (into their natural order) using the class method sort of the Arrays -class. ... Java's build-in sorting algorithms work with value type variables and some of Java's build-in reference type variables, like String .