I suggest that you put this program away for a while and a write a very simple program to learn some basic things.
You need to understand how to use variables, and loops and how to get input from users and how to store that in an object and how to go through those objects.

Create an arraylist and Write a loop that prompts the user for a number, reads that number in, creates an Integer object and put that object into the array list. Make the loop go around 5 times.
After getting the input from the user, write another loop to go through the arraylist, get the Integer objects out of the array list and sum up the values in the Integer object.

Member Avatar for mehnihma

I know how to deal with all values but specific value is a problem to me, I dont know how to continue....
I have done that and that I understad but this I dont know

but this I dont know

What is the "this" that you don't know?

I think You need to work with a simple program to get the techniques for handling elements from an arraylist in a loop. Write the simple program I suggested and get it to work.

Member Avatar for mehnihma

I got it now
Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.