그래서 내가이 작동하는 동안
public static Scanner fileWriter()
{
Scanner sc = new Scanner(System.in);
System.out.println("What is the name of the file? (succeeded by .txt)");
//String firs = sc.nextLine();
try
{
Scanner scanner = new Scanner(new File("Test.txt"));
}
catch(IOException e)
{
System.out.println("Io exception" + e.getMessage());
}
return scanner;
}
을 원하는 특정 파일, 스캐너를 반환, 내가 함께 문제가하고있는 유일한 것은 '반환 스캐너'입니다.
오류 내가 뭘 잘못
return scanner;
^
을 "기호를 찾을 수 없습니다"인가? ! :(감사
변수의 범위는 * scope *입니다. 특히, 둘러싸는 블록에. –