Arrays2.java contains solution.