depois eu vi..... foi mal. faltou colocar algo q dispensaria Thread.
� que o exemplo que eu tenho trata direto o m�todo run()... aqui voc� fez
dentro do main() e s� depois eu vi.
Agora tah melhor assim e vc v� a utiliza��o da class Thread.
import java.io.*;
public class IOTest
{
public void run()
{
try
{
while(true)
{
BufferedReader reader = new BufferedReader( new
InputStreamReader( System.in ) );
System.out.print( "Digite seu nome: " );
String line = reader.readLine();
System.out.println( "Seu nome � " + line );
if(line.equals("sair"))
break; //s� para sair do loop e finalizar o programa.
}
catch( IOException exc )
{
exc.printStackTrace();
}
}
}
public static void main( String[] args )
{
IOTest test = new IOTest();
test.start();
}
}