Ask your own question, for FREE!
Computer Science 7 Online
OpenStudy (anonymous):

What is an example of an ArrayList storing information (user input)?

OpenStudy (anonymous):

example?

OpenStudy (anonymous):

@A.Avinash_Goutham if various pieces of information are stored in the array list, how are they related to one another? I have the basics of the arraylist down, I just don't know how to use it, like asking for name and phone number.. but various entries.. and then they can delete one of the entries

OpenStudy (anonymous):

are you talking about any prog language in particular?

OpenStudy (anonymous):

@A.Avinash_Goutham java

OpenStudy (anonymous):

so u want a program to maintain a phone record?

OpenStudy (anonymous):

yeah

OpenStudy (anonymous):

well you can do it like define a class with some name say phoneRecord say it has two array lists one for name and one for phone number...assuming every1 has atmost 1 phone number and define methods to add and remove...

OpenStudy (anonymous):

This is what i have so far: http://pastebin.com/HPG3Rf3u

OpenStudy (anonymous):

yeah you got a single list for number u have to make another one for name and you forgot to append these details to the list use smthin like ArrayList<String> Name = new ArrayList<String>(); ArrayList<Double> Number = new ArrayList<Double>(); and Name.add(name); Number.add(number);

OpenStudy (anonymous):

@A.Avinash_Goutham I can;t reply.. "This user only accepts messages from people they have fanned."

OpenStudy (anonymous):

lol

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!