📜  java 找不到文件路径 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:43.396000             🧑  作者: Mango

代码示例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();

    }
}