Just copy this code and run you see that everything in this code is running , but third point say I am made a mistake.
package com.codegym.task.task18.task1822;
/*
Finding data inside a file
*/
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) throws IOException{
Scanner in = new Scanner(System.in);
String fileName = in.nextLine();
BufferedReader reader = new BufferedReader(new FileReader(fileName));
String s ;
while ((s = reader.readLine()) != null) {
if (s.startsWith(args[0])) {
System.out.println(s);
}
}
reader.close();
}
}