An unhandled exception means that it might be thrown somewhere in your code, but you are not taking it into account when you explicitly have to. So to fix, wrap it in a try-catch:
File f = new File("C:\\test\\est.txt");
try
{
Scanner in = new Scanner(f);
while (in.hasNext()){
System.out.println(in.next());
}
}catch (IOException i){
e.printStackTrace();
}
Note that the Scanner is also inside the try block. Your attempt was good, but the Scanner constructor also might throw a FileNotFoundException. To fix such issues in the future, the compiler tells you exactly which line that throws the exception, not being handled.