Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Take a look at it for me. I mean, if the input is not plastic surgery, let him keep playing like this. Why can't he try?
Take a look at it for me. I mean, if the input is not plastic surgery, let him keep playing like this. Why can't he try?
You recycle. If sr is not re-instantiated, sr is still the value you got last time.

Public? Static electricity int? Shuru ()? {

Scanner? sr? =? New? Scanner (system. in);

int? b = 0;

Bull? I = true;

while(i){

I = false;

Try it? {

sr? =? New? Scanner (system. in); //? Re-instantiate sc

b = Sr . nextint();

}? Catch? (exception? e)? {

system . out . println("…………");

I = true;

}

}

Sr . close();

Return? b;

}