文章列表
1.生成不重复随机数
long now = System.currentTimeMillis();
now = now << 16;
System.out.println(now | new Random().nextInt(0xffff));
2.正则表达式替换字符串
Pattern pattern = Pattern.compile("cat");
Matcher matcher = pattern.matcher("one cat two cats in the cat's yard");
StringBuffer ...