Alternatively..scanner can take a file parameter as input...
Scanner actualRead = new Scanner(pBase); //directly pass the file as argument...
//Although this threatens to throw an IOException..catch it in try-catch or add to throws...
try {
Scanner actualRead = new Scanner(pBase);
while (actualRead.hasNextLine()) {
System.out.println("Line is : " + actualRead.nextLine());
}
catch (IOException e) {
System.out.println("err...");
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…