public void readFile() throws FileNotFoundException {
int count=1;
File file = new File("..\\ReadFile\\test.txt");
FileInputStream fis = new FileInputStream(file);
Scanner scanner = new Scanner(fis);
while(scanner.hasNextLine()){
scanner.nextLine();
count++;
}
System.out.println(count);
int count=1;
File file = new File("..\\ReadFile\\test.txt");
FileInputStream fis = new FileInputStream(file);
Scanner scanner = new Scanner(fis);
while(scanner.hasNextLine()){
scanner.nextLine();
count++;
}
System.out.println(count);
}