FileNotFoundException:系统找不到指定的文件
word.txt".
java
Exception in thread "main" java.io.FileNotFoundException: word.txt (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at java.util.Scanner.<init>(Unknown Source) at Hangman1.main(Hangman1.java:6)
import java.io.File;import java.util.*;public class Hangman1 {
public static void main(String[] args) throws Exception {
Scanner input = new Scanner(new File("word.txt"));
String in = "";
in = input.nextLine();
}}
阿晨1998
潇湘沐
米琪卡哇伊
随时随地看视频慕课网APP
相关分类