james aggeles wrote:Thanks for the API link, but I don't see anything about intializing the ArrayList. I googled it but didn't see anyone creating an arraylist and then putting an array into it directly. do i have to create a for loop to do this with the .add command?
Winston Gutkowski wrote:
Darryl Burke wrote:but if I understood your post correctly you might find a SortedMap<String, SortedSet<Integer>> suitable.
And another class you might find useful is LineNumberReader.
Winston
jens jarl wrote:I figured it might be psuedo code, but my lack of experience caused me to be unsure, thanks for clearing that up.
Im trying to do it in the way you suggested, but for some reason I just can't seem to get this line of code to work, do you know whats wrong?
Ive never done this with a scanner before, just typing strenght(14); is easy and it works but when I try doing the same with the scanner I just get a variable error.
shivam singhal wrote:yeah.. 2 digit int...
in question its mentioning like that" CONSUMED UNITS in electricity bill"
n yeah they are related to country class.. as both the country provide electricity at different cost per unit..
shivam singhal wrote:hello Wesleigh..
my aim is not just entering the country name ,, but user must have to enter a 2-digit electric unit used ..
thats why i think to use array..