Here's another way to store the data for easy lookup. There's a product code such as 'A' for apple, which can then be used to look up the details of apples.

import java.util.HashMap;
public class...