| Author |
read a Double from a File
|
Dhan Priyan
Greenhorn
Joined: May 10, 2009
Posts: 12
|
|
Hai, I have some file xx.txt, it has the double values stored in it like below
1.2 1.4 23.44 12.78
23.4 12.45 23.0 10.4
i wanted to read this file and print to the Screen
I tried with my knowledge up to the following level. could any one help me to find the way.
thanks
|
 |
Steve Luke
Bartender
Joined: Jan 28, 2003
Posts: 3040
|
|
Nothing stands out at me from the code you posted. Does it work for you? What does it not do that you want it to? What is wrong with it?
You might also consider using the Scanner class (see the API here) instead of the DataInputStream. I think it is a bit easier to use.
|
Steve
|
 |
Steve Luke
Bartender
Joined: Jan 28, 2003
Posts: 3040
|
|
Also posted over at the Sun Java Forums.
Dhan, generally you should post to one forum, then expand to more forums only when/if you don't get satisfactory answers. Then, when you do crosspost Please be Forthright about it, and let everyone involved know about the concurrent conversations that are going on. That way there is more collaboration and less duplication of work.
|
 |
 |
|
|
subject: read a Double from a File
|
|
|