you can use the Arrays class in the java.util package
Java Programming