ok i just started loops in my java class and im stuck on getting this loop working i dunno what all math to do to get these numbers for the output 97, 84, 72, 61, 51, ... 1

The solution that you were given does not seem to work if I use it, so I decided to use another method using a while loop and the instructions are as follows

int i = 97;
int j = 14;

while(j > 0)
{
System.out.println(+ i);
j--;
i = i - j;
}
This solution will definately work, try it and you will see.

The first implementation doesnt work because diff ends up becoming negative before the value reaches 0. Should be an infinite loop if my quick glance is correct.

Well I just took a look at the program...
The numbers 97, 84, 72, 61, 51, ... 1 are wrong.
It doesn't end at 1, and it doesnt actually go negative, which is why my loop is infinite.
So depends where you want the loop to end, the smallest it gets to is 6. So you could end it at 6.

ok i just started loops in my java class and im stuck on getting this loop working i dunno what all math to do to get these numbers for the output 97, 84, 72, 61, 51, ... 1

Hello!
My question is how to code search in combobox each time typeing a letter. And the search result in DropDown have to show list items which contains letter or ...