aspose file tools*
The moose likes Beginning Java and the fly likes do while ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "do while ??" Watch "do while ??" New topic
Author

do while ??

zzzzzzz zzzzzzzh
Greenhorn

Joined: Nov 22, 2005
Posts: 1
System.out.println("escolhe 1 ....es.. 2 ou 0");
repetir = false;
switch(Teclado.intLido()) {

case 1 : System.out.print(x);break;
case 2 : System.out.print(x);break;
case 0 : System.out.print(x);break;
default : { repetir = true;
// voltar a pedir pa escolher a op�ao caso ela n exista
}
}
}while (repetir = false) ;

forget the code. i just want to do a "do while" loop
with the those three cases.
if the answer is != 1 || 2 || 0
it asked again .

THANKS
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Please take a look at our JavaRanch Naming Policy and change your displayed name to comply with it. We require a displayed name in the form of <first name><space><family name>, preferably your real name. A profile with a displayed name as you have chosen will be locked out if you persist using it.
Thanks
-Barry


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
jiju ka
Ranch Hand

Joined: Oct 12, 2004
Posts: 306
 
 
subject: do while ??