Originally posted by tolkienarda
[CODE=java]
do
{
System.out.prin tln("Enter a line of text");
line = console.nextLin e();
length = line.length();
i=length - 1;
rev = recRev(line, i);
System.out.prin tln("\n would you like to go again(y/n)");
cont = false; // You need this!!!
if(console.next ().equals("y"))
cont = true;
} while(cont);
[/CODE]otherwise, it will be set to true once and forever.
You said something about not being able to reverse your String? It seems to do that fine in your output, doesn't it?
Greetings,
Nepomuk
Comment