Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Danny, you could try using a BufferedReader object. It wraps around another input reader (such as InputStreamReader, or FileReader). For more info, see Sun's Java Documentation. BufferedReader has a method called readLine() that you would probably use. It reads a line of text and returns it as a string. Then you could parse the string, and extract the info you want, and convert it to integer to store in your array. (I know there's a way to convert from String to int, but I'm not sure how). Anyway, hope this helps. > Hi experts ! This shozuld be an easy question : > class numberlist > // Constructors > ** ? ** -> How to put the information from the file "name.txt" into numberlist[i] > Thanks in advance
Replies: |
Sponsored Links
|