Given a list of IP address, how do you find min, max ?

Posted by zeroin23 on Stack Overflow See other posts from Stack Overflow or by zeroin23
Published on 2010-05-11T08:01:04Z Indexed on 2010/05/11 8:04 UTC
Read the original article Hit count: 209

Filed under:
|
|

In Java, i have an arrayList of ip address. how do i find the min and max ?

I have used the Collection.min() but it doesnt work given a case like :

192.168.0.1 <--min
192.168.0.250
192.168.0.9 <--max

how do i return

192.168.0.1 <--min
192.168.0.250 <--max

instead?

© Stack Overflow or respective owner

Related posts about java

Related posts about collections