I'm stuck. I'm trying to remove the last comma at the back of the output but I just don't know how.
123, 97, 88, 99, 200, 50,
This is my code below, while checking for highest number in array.
public static void main(String[] args) {
int[] array = {4, 97, 123, 49, 88, 200, 50, 13, 26, 99};
for (int i : array) {
if (i >= 50) {
System.out.print(i + ", ");
}
}
System.out.println();
}