Upon running following code under class FlightSearch
String moreSearch = \"y\";
List resultList;
// load initial flight d
After making changes as suggested in previous answer my code didn't tun but with slight more changes as shown below, my code compiled and run just fine
try {
do {
// main thread gets input
Input inputQuery = new Input();
inputQuery.getQuery();
// main thread STARTs processing task as background monitors csv
// repo
QueryProcessor processor = new QueryProcessor();
resultList = null;
resultList = processor.matchQuery(inputQuery);
displayResult(resultList, inputQuery.getFlightClass());
System.out
.println("More Flight Query ? Press n/N to exit. Anyother key to continue searching.");
moreSearch = br.readLine();
} while (!moreSearch.equalsIgnoreCase("n"));
} catch (IOException e) {
e.printStackTrace();
} catch (InvalidException e1) {
e1.getMessage();
} finally {
fl.stopThread();
if (br != null) {
try {
br.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
System.out.println("Thank You !!!");
}
thanks for help.