Search:

Type: Posts; User: Norm

Search: Search took 0.15 seconds.

  1. Replies
    18
    Views
    1,547

    [SOLVED] Re: Array Population via .txt File

    What does this statement do?

    readIn = varlib.tableA[i];
    Is that what you want to do?
  2. Replies
    18
    Views
    1,547

    [SOLVED] Re: Array Population via .txt File

    Your output does not make sense. Look at these lines of code:

    readIn = br.readLine();
    System.out.println("readIn=" + readIn + "<"); // This line should ALWAYS print first

    Look at the...
  3. Replies
    18
    Views
    1,547

    [SOLVED] Re: Array Population via .txt File

    When you execute a println with a single space it would be easy to miss.

    You code reads a file and prints out the lines in the file on my system.

    I get this message for a non-existent file:...
  4. Replies
    18
    Views
    1,547

    [SOLVED] Re: Array Population via .txt File

    Have you done a search on your PC for the file you are trying to read?
    Are there any other files with the same name? Your program is reading from an empty one.

    readIn = br.readLine();
    ...
  5. Replies
    18
    Views
    1,547

    [SOLVED] Re: Array Population via .txt File

    Why are the lines printed out in different order than the program shows they should be?
    null should print before your message?

    You should add an id String with a variable when you print it to...
  6. Replies
    18
    Views
    1,547

    [SOLVED] Re: Array Population via .txt File

    Print out the value of readIn right after you read into it to see what was read.
    Print it out again after the assignment statement into the array.

    Does it print out the same number of lines as...
  7. Replies
    18
    Views
    1,547

    [SOLVED] Re: Array Population via .txt File

    If this is printing: "File returning null value", then the file must be empty.
    Do a search to be sure there is only one file.
  8. Replies
    18
    Views
    1,547

    [SOLVED] Re: Array Population via .txt File

    When reading from a file, the readLine method will return null under some conditions.
    Read the API doc for the method to see when that happens.
    Your code should test the value returned by readLine...
Results 1 to 8 of 8