Topic: 菜鸟问题:如何从键盘输入字符串,再赋给字符串对像?

  Print this page

1.菜鸟问题:如何从键盘输入字符串,再赋给字符串对像? Copy to clipboard
Posted by: rjyang
Posted on: 2005-03-01 10:52

各位大大,小弟菜鸟,请教如何从键盘输入一行字符中,再把这个字符串赋给字符串对像?谢谢!!!

2.Re:菜鸟问题:如何从键盘输入字符串,再赋给字符串对像? [Re: rjyang] Copy to clipboard
Posted by: simbas
Posted on: 2005-03-01 12:11

public String getstring() throws IOException{
InputStreamReader isr =new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
return br.readLine();
}

3.Re:菜鸟问题:如何从键盘输入字符串,再赋给字符串对像? [Re: rjyang] Copy to clipboard
Posted by: rjyang
Posted on: 2005-03-01 12:58

哈哈,搞定!!!!
感谢兄弟的相助!!!!!!!!Thumbs up


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923