摘要: Math类 提供了常用的数学方法和两个静态常量(E 和PI) Math在Java.lang.Math包中 Math常用的方法 Random类 在java.util.Random包中 方法案例: 阅读全文
posted @ 2020-06-01 15:06 宋凯文 阅读(208) 评论(0) 推荐(0)
摘要: 对字符串频繁修改(如字符串连接)时,使用StringBuffer类可以大大提高程序执行效率 StringBuffer声明 StringBuffer strb = new StringBuffer();StringBuffer strb = new StringBuffer("aaa"); Strin 阅读全文
posted @ 2020-06-01 15:00 宋凯文 阅读(136) 评论(0) 推荐(0)