Arrays.sort(ns); for(int i = 0; i < ns.length -1; i++) { int j = ns.length - i - 1; if(i < j) { int t = ns[j]; ns[j] = ns[i]; ns[i] = t; } }
Sign in to make a reply
细雨小巷