removed to stay on topic..
Copeg how to delete a post?
Type: Posts; User: william
removed to stay on topic..
Copeg how to delete a post?
Im going home:: have a good night
Scanner reader = new Scanner(System.in);
boolean flag = true;
int end = -10 ;
do{
try {
well I finished you answer.....
my Outputs:
run:
in here
7
end is 7
in here
8
Its not documented cause i wrote the entire thing.
Why would you think I don't under stand this code?
Its junk code, I use test each component before adding it to the project. This tiny...
I do understand. You don't stop to read the input line when in the Reader. you never clear out the IO stream out so you always get get same input. Use a if statement in the try catch to stop this....
I think this is a good example for a do-while loop then, set the boolean within the if-else statements
static int smartInputInt (){
boolean flag=false;//<--- do one time unless turned to...
remove line
flag=true;
in your catch() method
this way you only fall through it once. Your in a while loop while true...