0

What does that long minus after the variable mean?

int x = 5, y =1; do { y++; } while (x-- >= 0); // what is this minus sign doing there? System.out.print(y); found it in a challenge question by Petér Gyöngyik. And this isn't the only question I found this in... @Cлaвeн Ђервида thx, i haven't seen that this minus are two minus after eachother. Soluion: Actually it is pretty hard to tell the difference between one or two minus signs in challenge questions on my tablet.

16th Apr 2018, 12:39 PM
Johann Leis
Johann Leis - avatar
4 Respuestas
+ 1
x-- maybe?
16th Apr 2018, 12:54 PM
Cлaвeн Ђервида
Cлaвeн Ђервида - avatar
0
Can you give an example code?
16th Apr 2018, 12:40 PM
Jordan Patterson
Jordan Patterson - avatar
0
I test that is cpp and it show me a error!
16th Apr 2018, 12:53 PM
Cлaвeн Ђервида
Cлaвeн Ђервида - avatar