I was trying to remove the last comma in the loop so it wouldn't show the extra comma on the last part. Already tried experimenting bunch of times on the code but it does not work at all.
System.out.println("--Unsorted Array--");
for(int i = 0; i < mergeS.length; i++){
System.out.print(mergeS[i]);
for(int j = 0; j < 1; j+=mergeS[i]-1){
System.out.print(", ");
}
}
My expected output is 95, 85, 75, 65, 55 but the actual output is 95, 85, 75, 65, 55,