Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

reverse list

807606Mar 7 2007 — edited Mar 10 2007
Hi!
I've a list with some elements, for example 5 1 2 3.
i've to write a method (just using cursors, no other classes) that reverse the list (3 2 1 5) but I've no idea about what I should do...
I thought to use 2 cursors, one that starts from the beginning and one that everytime goes to the [length]-i element..but how?
Or do you know another easier way?
Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 7 2007
Added on Mar 7 2007
17 comments
246 views