0 0.5 100
0 0.8 200
1 0.9 230
。。。
还有很多数据,在JAVA中怎样把这个TXT文档中的数据分别读到X,Y,Z三个动态数组
VB中很简单,只要
CommonDialog1.Filter = "*.txt(文本文件)|*.txt"
CommonDialog1.ShowOpen
Df = CommonDialog1.FileName
Open Df For Input As #11
k = 1 '定义K为动态数组计数器
Do While Not EOF(11)
ReDim Preserve XAxis(k), YAxis(k), ZAxis(k)
Input #11, XAxis(k), YAxis(k), ZAxis(k)
k = k + 1
Loop
Close #11
请高手指点下在JAVA中怎么操作?(希望有代码供参考)
因为有很多数据所以只给出部分,但希望把这三行数据也做成动态处理添加到数组中,谢谢!