If you register for free, you will be able to post threads, vote on polls and lots more. If you have problems with the registration or logging in, please contact the administrator.
Is this the only class you have? As there is no main method in this class.
As far as other problems are concerned, your not adding the Sting or double array items into ArrayLists items or prices. So just to be on the safe side try using a for loop to add things.
Sorry to double post but you could try to convert the arrays into ArrayLists
Example:
// converting an array to an ArrayList, without Generics
String[] animals = { "bear", "cougar", "wolverine"};
ArrayList al = new ArrayList( Arrays.asList( animals ) );
// converting an ArrayList to an array without generics,
String[] predators = (String[])al.toArray( new String[ al.size() ] );
i don't get what you're trying to do with it to be honest. if you're trying to map the prices to the items wouldn't you be better off using a HashMap or an enum or something?