Java by API/java.io/FileNotFoundException

Материал из Java эксперт
Перейти к: навигация, поиск

java.io.FileNotFoundException

 
import java.io.FileInputStream;
import java.io.FileNotFoundException;
public class Main {
  public static void main(String[] a) {
    FileInputStream inputFile = null;
    try {
      inputFile = new FileInputStream("C:/myFile.txt");
    } catch (FileNotFoundException e) {
      e.printStackTrace(System.err);
    }
  }
}