大龄屌丝自学笔记--Java零基础到菜鸟--025

正则表达式,Math类,Random类

 

1、正则表达式

概念:用来描述或匹配一系列符合特定规则的字符串的字符串,即用来验证字符串是否符合特定规则的字符串。public boolean matches(String regex)

调用:str.matches(regex);

API:Pattern类,Matcher类

正则表达式word下载链接:http://pan.baidu.com/s/1bnDeI8B 密码:ybws

 

2、Math类

abs();

ceil();

floor();

max();

min();

pow();

random();

round();

sqrt();

 

3、Random类

nextInt();

posted @ 2015-10-06 19:37  ilmari  阅读(140)  评论(0编辑  收藏  举报