I want to log failed entry in a text file.
}else System.out.println("not found!");
//Enter entry(log it) in a txt file.
How should I go about doing this simply without creating a method?
EDIT:I mean if method is better, then suggestions?