摘要:
public class ListAddMap { public static void main( String args[] ) { List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); Map<String 阅读全文
摘要:
nextInt方法会生成一个随机的在5以内的数,负载均衡随机策略底层用的就是这个方法; Random rand = new Random(); int index = rand.nextInt(5); System.out.println(index); 偶数和2取余都等于0; 奇数和2区域都等于1 阅读全文