Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java SE 综合讨论区 » 学习心得/方法/资源  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 求助
探物穷理





发贴: 1
积分: 0
于 2008-04-16 16:02 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
3491 8.693 119.307 4.603
1319 8.695 125.702 8.905
324 8.696 131.061 0.505
298 8.696 131.039 7.119
307 8.699 131.039 4.237
299 8.700 131.061 6.948
317 8.701 131.039 2.096
308 8.701 131.039 4.053
316 8.701 131.061 2.309
296 8.701 131.061 7.643
313 8.701 131.039 2.934
305 8.703 131.061 4.501
318 8.703 131.039 1.850
303 8.703 131.083 4.998
321 8.703 131.039 1.353
3517 8.704 119.351 2.846
3547 8.704 119.307 0.865
4617 8.704 116.220 2.478
322 8.704 131.061 1.063
323 8.704 131.083 0.877
4523 8.704 116.617 3.235
java新手求助:Java编写程序,读进txt文件,然后对其里面的数据处理,
数据如上面的,想把每一列单独取出,谢谢众友!

数据.txt (1.48k)



作者 Re:求助 [Re:探物穷理]
xuxiaolei

^_^



发贴: 169
积分: 23
于 2008-04-18 13:14 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
先用BufferedReader读取每一行,并在每一行上用indexof算出空格位置的索引然后用substring提取出第一列数据


http://xuxiaolei.javaeye.com
作者 Re:求助 [Re:探物穷理]
andy_wang_5





发贴: 101
积分: 14
于 2008-04-18 13:19 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
好像有方法可以把字符串分割,把分割后的内容放到字符串数组里。把分割符设成空格。


鹰行折翼 再盼凌云
作者 Re:求助 [Re:andy_wang_5]
JiafanZhou



版主


发贴: 736
积分: 61
于 2008-04-18 15:43 user profilesend a private message to usersend email to JiafanZhousearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
andy_wang_5 wrote:
好像有方法可以把字符串分割,把分割后的内容放到字符串数组里。把分割符设成空格。

Yes, you are right. String.split("xyz");



When I was a kid I used to pray every night for a new bike. Then I realized that The Lord doesn't work that way, so I stole one and asked him to forgive me.

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   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