Topic: 怎么样输入字符串啊?

  Print this page

1.怎么样输入字符串啊? Copy to clipboard
Posted by: jasonwing27
Posted on: 2004-12-09 21:29

输入整形有int x = Integer.parseInt(in.readLine())
输入Double型有 double x = Double.parseDouble(in.readLine())
那么输入一个字符串该怎么办呢

2.Re:怎么样输入字符串啊? [Re: jasonwing27] Copy to clipboard
Posted by: april518
Posted on: 2004-12-10 20:17

在JAVA 里面,参数是以String 形式来传递的,既然如此,楼主你觉得应该怎么作呢?呵呵

3.Re:怎么样输入字符串啊? [Re: jasonwing27] Copy to clipboard
Posted by: HJILY44
Posted on: 2004-12-11 10:05

char[] b=new char[100];
String s=new String[b];
System.in.readBeer;
当然也可以用args[]

4.Re:怎么样输入字符串啊? [Re: jasonwing27] Copy to clipboard
Posted by: 理想の朽朽木
Posted on: 2004-12-14 21:41

方法不单一吧!


   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