how to invoke sort method in array in java code example Example: sort array java import java. util. Arrays; Arrays. sort(array);