No. The int asd = 100;
is masking the old asd
variable.
What you want (I suppose) is to just assign the value 100 to asd
, which (and I'm sure you know this) you could simply do by writing asd = 100;
.
There is, of course, one more issue: you would want to do that before the while
loop - otherwise, you're going to have an infinite loop because at the beginning of every iteration the value of asd
will be 100.
You're missing a ;
after asd = 100
, by the way.