[Solved] Java; looking for lowest Int [closed]


The problem was that you initialized some values that caused errors during the first iteration when you check for the smallest number.

I added the following condition that will set the smallest number to the current number, but only during the first iteration.

if (count2 == 1 || num < smalled ) {
    smalled = num;
}

1

solved Java; looking for lowest Int [closed]