Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Replies
    15
    Views
    3,042

    Re: Reading from a sequential file to an array

    I have no idea where the current directory is for a program executing in an IDE.
    Did you try this:
    Create a File object with the filename you want to use and then print out the File object's...
  2. Replies
    15
    Views
    3,042

    Re: Reading from a sequential file to an array

    How are you running the program? IDE's mess up what you might think about where files are.
    Create a File object with the filename you want to use and then print out the File object's absolute path...
  3. Replies
    15
    Views
    3,042

    Re: Reading from a sequential file to an array

    Use the File constructor with only the filename
  4. Replies
    15
    Views
    3,042

    Re: Reading from a sequential file to an array

    "C://Users/Xrrak"
    try removing the extra /
    "C:/Users/Xrrak"
  5. Replies
    15
    Views
    3,042

    Re: Reading from a sequential file to an array

    When you look at paths on your OS, what is shown, say in Windows Explorer? That is what you need to use. Something like this:
    E:\\Backups

    You need two \s because the \ is a special character...
  6. Replies
    15
    Views
    3,042

    Re: Reading from a sequential file to an array

    There are lots of sample programs here on the forum. Do a Search here for Scanner.
  7. Replies
    15
    Views
    3,042

    Re: Reading from a sequential file to an array

    For reading text the Scanner class is one easy way. It has methods to detect if there is more input that could be used to control a loop where you read each line and put it into an array.
Results 1 to 7 of 7