业务需要将两个IP地址转换为Long类型整数,在其中取10个随机数去判断地址所在地。。random里面只有int可以指定范围,nextLong不能指定范围
ip(ipv4)地址就是int啊xxx.xxx.xxx.xxx,4个字节。