Here\'s a method for sorting an integer array. How can I remove the last separator form the output?
public void Sort(int[] sort) { for (int a:sort) {
public void Sort(int[] sort) { int i = 1; String str = Arrays.toString(sort); str = str.substring(i,str.length()-1); System.out.println(str); }