|
-
May 6th, 2000, 01:26 AM
#1
Input double from the file
Hello,
Could someone tell me how to input double(or integer) type from a file?
I had used DataInputStream for that. When I used "writeInt" to write
to a file and then used "readInt" to read from the same file, it worked.
But if I used "readInt" directly to read from a .txt or .dat file, and then
used "System.out.println" to print out the value read in, the value is
extremely large or small(something like undefined). Such as if I have
8 single digit numbers in a file, after readInt(), I'll get maybe 5 large
numbers for the output.
Thanks a lot!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|