import java.io.*;public class change
{public static void main(String args[])
{
boolean con = true;while(con)
{
try {
System.out.println("Please enter a character");
BufferedReader input = new BufferedReader (new InputStreamReader(System.in)); String out = input.readLine().toLowerCase();
System.out.println(out);
System.out.println("to be continued(Y/N)?"); BufferedReader flag = new BufferedReader (new InputStreamReader(System.in));
if(flag.readLine().equalsIgnoreCase("n"))
{
con=false;
}
} catch(IOException e){}}}}
呵呵, 随便改了一下
{public static void main(String args[])
{
boolean con = true;while(con)
{
try {
System.out.println("Please enter a character");
BufferedReader input = new BufferedReader (new InputStreamReader(System.in)); String out = input.readLine().toLowerCase();
System.out.println(out);
System.out.println("to be continued(Y/N)?"); BufferedReader flag = new BufferedReader (new InputStreamReader(System.in));
if(flag.readLine().equalsIgnoreCase("n"))
{
con=false;
}
} catch(IOException e){}}}}
呵呵, 随便改了一下
class change
{public static void main(String args[]) throws IOException
{int a,b,c;int m=1;
while(m!=0)
{
System.out.println("please enter the character:");
a=System.in.read();
while(System.in.available()>0) //看流里还有没有字符
System.in.read(); //读出来丢掉
if(a>='A'&&a<='Z') a+=32;
System.out.println((char)a);
System.out.println("to be continued(Y/N)?");
c=System.in.read();
while(System.in.available()>0)
System.in.read();
if(c=='N')
m=0;
}
}
}