摘要:
1、来源 random.nextInt() 为 java.util.Random类中的方法; Math.random() 为 java.lang.Math 类中的静态方法。 2、用法 产生0-n的伪随机数(伪随机数参看最后注解): 1 2 3 1 3、jdk源码 4、总结 5、注:何谓伪随机数 伪随 阅读全文
posted @ 2017-09-28 21:31
花江
阅读(291)
评论(0)
推荐(0)
摘要:
1.三者在执行速度上: StringBuilder > StringBuffer > String 2. String:不可变长字符串 StringBuilder : 为可变长字符串 StringBuffer:为可变长字符串 示例一:String s = "this is a"; System.ou 阅读全文
posted @ 2017-09-28 21:21
花江
阅读(121)
评论(0)
推荐(0)