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) {
I think this can fix the problem just try it.
public static void sort(int[] sort) { for (int a:sort) { if(a==sort[sort.length-1]) System.out.println(a); else System.out.print(a+ ", "); }