0

After importing a csv I attempted to read the file into two arrays. However, I'm getting the FileNotFoundException, though I made sure that the file existed. Any ideas what's wrong?

https://repl.it/repls/VapidFrighteningMention#Main.java

'''

import java.util.Scanner;
import java.io.*;
class Main {
  public static void main(String[] args) {
    String[] temp = new String[44];
    String str = "";
    File file = new File("file.csv");
    Scanner reader = new Scanner(file);
    
    reader.nextLine(); // skips first 2 lines of file.csv
    reader.nextLine();

      //more code etc....


  }
}

'''

djifan23
  • 11
  • 2
  • 1
    Does this answer your question? [Java says FileNotFoundException but file exists](https://stackoverflow.com/questions/19307622/java-says-filenotfoundexception-but-file-exists) – Marvin Oct 04 '20 at 22:40
  • Welcome to Stack Overflow! In the Stack Exchange network, we value questions with research effort. Before posting a question, do some Google searches related to your issue, and you will likely find answers to your exact question. – Marvin Oct 04 '20 at 22:43

0 Answers0