This week's book giveaway is in the Other Open Source APIs forum. We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line! See this thread for details.
Hi Better use a java bean for storing these kinds of things. I mean temperature,as well as other details of the user. If you have one similar bean then write getter and setter methods for storing this temperature.
Whats the need of arraylist?? You said you have to store only 1 single temperatiure value.
I need to store as many values as the user inputs and converts during the run of the program.
eg: a user could input 10 degrees celsius and convert it to a fahrenheit value, then 25 degrees celsius and convert that and so on. They would then need to be able to go backwards and forwards through these values.
Therefore, I just assumed an array was the best way to store and access these values, but I'm not sure how to implement this solution.
It sounds like an ArrayList might be a better tool than an array. I say this because you don't know exactly how many numbers you will be storing. Most likely this ArrayList should be a member variable somewhere, but I'm not sure which class it should belong to since you haven't posted any description of your design.