Search:

Type: Posts; User: Xrrak

Search: Search took 0.07 seconds.

  1. Replies
    15
    Views
    3,061

    Re: Reading from a sequential file to an array

    I am using netbeans and I put the file in the src folder for the project with the java files.
  2. Replies
    15
    Views
    3,061

    Re: Reading from a sequential file to an array

    Scanner scan = new Scanner(new File("loanData.txt")); //provide file name from outside
    int counter = 0; //keep track of how many in the file
    while(scan.hasNextLine())
    {
    ...
  3. Replies
    15
    Views
    3,061

    Re: Reading from a sequential file to an array

    That worked as well. Thinking on it though I guess it is simplest to have it look on the main drive, unless there is a way to tell the program that the text file is in the same place the program is...
  4. Replies
    15
    Views
    3,061

    Re: Reading from a sequential file to an array

    I replaced the "/" with "C://Users/Xrrak" and that did the trick. Thanks again.
  5. Replies
    15
    Views
    3,061

    Re: Reading from a sequential file to an array

    If needed, I have also included the code for all for classes and the text file in case anyone needs to run it.



    package week5;

    /**
    *
    * @author Chad McCoy
    */
  6. Replies
    15
    Views
    3,061

    Re: Reading from a sequential file to an array

    Thanks for pointing me in the right direction everyone, I now have the program reading from a sequential file into an array. The only issue I am having is making the path anywhere except "/". I have...
  7. Replies
    15
    Views
    3,061

    Re: Reading from a sequential file to an array

    Thanks, know of any easy to understand tutorials for these ideas? I have looked at the Oracle tutorial site over and over and it just is not making sense to me.
  8. Replies
    15
    Views
    3,061

    Reading from a sequential file to an array

    I am having trouble figuring out what I want to do, and the idea seems like it would be simple. I have four lines in a text file, they are strings and include "7 years at 5.35%", "10 years at 5%",...
Results 1 to 8 of 8