主题:D能提供一个输入输出字符串的简单程序吗?谢谢~~
zzxwill
[专家分:0] 发布于 2007-11-13 21:12:00
能提供一个输入输出字符串的简单程序吗?谢谢~~
最后更新于:2008-06-07 13:54:00
回复列表 (共4个回复)
沙发
justforfun626 [专家分:18460] 发布于 2007-11-13 21:53:00
Can you just write one by yourself?
板凳
zzxwill [专家分:0] 发布于 2007-11-13 22:32:00
Thank you for your advisual words .I have solved it.
3 楼
justforfun626 [专家分:18460] 发布于 2007-11-14 00:16:00
I knew you can do it.
The question is NOT how to do it, but DO IT or wait for someone else to do it for you.
Thanks!
4 楼
happyboy2007 [专家分:3900] 发布于 2007-11-14 12:09:00
import java.io.*;
class Demo
{
public static void main(String[]args)throws Exception
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println ("请输入字符串,end结束。");
String str = "";
while(!(str=br.readLine()).equals("end"))
{
System.out.println (str);
}
br.close();
}
}
我来回复