public class QTest{
public static void main(String[] args)throws Exception{
int count=0;
System.out.println("Please input characters,if character is 'q',quit!");
count=System.in.read();
while ('q'!=(char)count){
System.out.println((char)count);
}
public class Test
{
public static void main(String[] args)throws Exception
{
char c;
while(true){
if((c=(char)System.in.read())!='q')System.out.println(c);
else break;
}
}
}