I need to create a Java console application to that make suggest of the name of food to the user. An information will get from sqlite database file. User will write text and program will whispering the names of items. When user want to complete the text he press the TAB key and application will get next item. I have already all databases items recorded at ArrayList.
My main idea(without everything except for the text at search text field)
Part of code
Scanner sc=new Scanner(System.in);
ArrayList<Food> foodList= DatabaseServices.loadAllFood();
ArrayList<String> foodNameList=new ArrayList();
String nameFood;
while (condition) {//when I have all recipe names
//some code
nameFood=sc.nextLine();
foodNameList(nameFood);
}
Is there some easy way to do that???
PS: I'm sorry for my english.
Aucun commentaire:
Enregistrer un commentaire