I have a collection class (a java.util.ArrayList
). When I go through the collection and print the lines, the output looks like this:
x = 1997 y = 1700
x = 1996 y = 1800
x = 1992 y = 1150
x = 1994 y = 1300
x = 1993 y = 1000
x = 1995 y = 1650
How do I get max x, min x, max y, and min y from this collection?