Ok, that looks about right.
For testing to see what is in the array use the Arrays class's toString() method:
System.out.println("an ID "+ java.util.Arrays.toString(theArrayNameHere));
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Ok, that looks about right.
For testing to see what is in the array use the Arrays class's toString() method:
System.out.println("an ID "+ java.util.Arrays.toString(theArrayNameHere));
If you don't understand my answer, don't ignore it, ask a question.
Elyril (March 9th, 2014)
and the result being
Is the print out the amount of each specific number? and if so, is there a way so I can specify which amount is for which number?1 8 7 7 3 1 5 4 8 3 8 2 9 6 5 4 0 3 7 1 Random: [1, 3, 1, 3, 2, 2, 1, 3, 3, 1]
Write a loop like you had before that prints the index value and the contents of the array at that index.specify which amount is for which number?
That is easily verified by looking at the numbers that were printed on the line above the line showing the contents of the array.Is the print out the amount of each specific number?
If you don't understand my answer, don't ignore it, ask a question.
Elyril (March 9th, 2014)
Thank you so much! I feel like my head was going to explode...
Hopefully arrays will be easier next time.
If you don't understand my answer, don't ignore it, ask a question.
Yes, I hope so too. I should also take it slow and think. Thank you again