Search:

Type: Posts; User: Norm

Search: Search took 0.12 seconds.

  1. Replies
    10
    Views
    1,274

    Re: Trouble reading a Text File

    The split() method will separate the tokens on a String into separate Strings that can be converted to numeric values.

    Another way to separate the tokens in a String into numbers is by putting the...
  2. Replies
    10
    Views
    1,274

    Re: Trouble reading a Text File

    The String class's split() method can be used to break a line into parts.
  3. Replies
    10
    Views
    1,274

    Re: Trouble reading a Text File

    Yes, that is what I meant.

    Try writing a test program that reads from the file using nextLine() and prints out every line as it is read so you can see what the method does.
  4. Replies
    10
    Views
    1,274

    Re: Trouble reading a Text File

    The code you've posted does not read the text from the file line by line. The methods you are using read tokens from the file ignoring the end of line character. The data could be like this:
    Block...
  5. Replies
    10
    Views
    1,274

    Re: Trouble reading a Text File

    Can you post the code you are using to read the file and explain what the problems are?
Results 1 to 5 of 5