I'm making an application where the user can save travels with destination and length of travel. Then I somehow want to see what the longest are. All travels are objects in a LinkedList, and length of travel is integer.
How can I get the highest value of length of travel?
Solution: Ended up using iteration through nodes:
for (Travel travel : travelList) {
longest = travel.getLength();
destination = travel.getDest();
if (travel.getLength() >= longest)
{
destination = travel.getDest();
}
}