File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "do while ??" Watch "do while ??" New topic

do while ??

zzzzzzz zzzzzzzh

Joined: Nov 22, 2005
Posts: 1
System.out.println("escolhe 1 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 .

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.

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
I agree. Here's the link:
subject: do while ??
It's not a secret anymore!