I am in an introduction class for Java, and I am having trouble with ArrayLists.
I need to create a program that asks the user how many jobs they work, and then have the user be able to enter the income for each job. So the user will enter 3 jobs, and then the program will ask, "Enter the income for job 1:" And the user will enter a number, and it will store that number to be used and displayed later.
I just don't understand how I can create an ArrayList with the length of jobs, and then have the user enter in data that will be saved to the ArrayList.


LinkBack URL
About LinkBacks
Reply With Quote