Check out example codes for "java cannot find file path". It will help you in understanding the concepts better.
Code Example 1
public static void main(String[] args) {
Scanner scanner = new Scanner(ScannerReadFile.class.getResourceAsStream("CardNative.java.txt"));
while (scanner.hasNextLine()) {
String line = scanner.nextLine();
System.out.println(line);
}
scanner.close();
}
}
Learn ReactJs, React Native from akashmittal.com