You can do something like this:
BufferedReader br = new BufferedReader(new FileReader("file.txt"));
String currentLine;
while ((currentLine = br.readLine()) != null) {
String[] strArgs = currentLine.split(" ");
//Use HashMap to enter key Value pair.
//You may to use fruit vegetable as key rather than other way around
}