摘要: Java中产生一个随机数有2种常见方法: random.nextInt() 为 java.util.Random类中的方法; Math.random() 为 java.lang.Math 类中的静态方法。 一、基本用法 产生0-n的伪随机数 // 两种生成对象方式:带种子和不带种子(两种方式的区别见 阅读全文
posted @ 2017-08-09 23:18 古兰精 阅读(673) 评论(0) 推荐(0) 编辑
摘要: 一、警告:“explicit type argument xx can be replaced with......” 1、问题背景 开发时有警告信息: explicit type argument xx can be replaced with<>,完整的信息如下: explicit type a 阅读全文
posted @ 2017-08-09 22:40 古兰精 阅读(1148) 评论(0) 推荐(0) 编辑