I am just starting to look at java code so i appreciate the link and help, this is what i've come up with for the first two but they dont compile -
1.
[CODE=Java]public void getmax() {
for (ListIterator<I nteger> it = list.listIterat or(list.size()) ;
it.hasPrevious( ); ) {
Integer max = it.previous();
if(list.get(x) > it.previous());
x = max;
...
User Profile
Collapse
-
-
Help with List/Map java Problems please!
I'm doing some practice questions and cant seem to work out these collection probelms think i need to use iterator or a while loop but cant seem to get them to work - dont really know how i'd go about getting the highest value in the collection any help would be appreciated, even just learning from the answers would be a lot of help.. cheers - see below
[1] Given a list of integers and an integer variable declared like this:
...
No activity results to display
Show More
Leave a comment: