As a newbie i m facing a small prob right now...
i have code to search names from many files and compare the results with similarity scoring.
its working but when the names found my program should show the filepath or fileName for each names.
how can i do this ??
Scanner scanner = new Scanner(System.in);
String SearchName;
System.out.print("Enter name to Search : ");
SearchName= scanner.next();
for (String found: names) {
double compare = SearchCompare.LCS(found, SearchName);
if (compare !=null50.0) {
String f=found.toString();
System.out.println("Found names : "+found+ " Similarity score: " +compare+ "File Name: "+f); }
//else {System.out.println("No search result found"); }
}
it should work with "f.getName()" but showing error...
pls help me..