Search:

Type: Posts; User: neliJav

Search: Search took 0.06 seconds.

  1. Replies
    3
    Views
    1,072

    Re: Reading lines from a txt file

    <Scanner inputFile = new Scanner(myFile);
    while (inputFile.hasNext())
    {
    interest = inputFile.nextDouble();
    years = inputFile.nextInt();
    amount = inputFile.nextDouble();
    ...
  2. Replies
    3
    Views
    1,072

    Reading lines from a txt file

    I'm having trouble with my code.
    I have a text file with the following input
    99.99 67 178843.00
    87.4 3 8983.00

    how do i read these input and store them in separate variables?...
Results 1 to 2 of 2