public class Test20 {
public static void main(String[] args) {
String str = "-12.4e-10";
String patten = "[\\-\\+]?\\d+(\\.\\d+)?([eE][\\+\\-]?\\d+)?"; //正则表达式
System.out.println(str.matches(patten));
}
}
20表示数值的字符串
猜你喜欢
转载自blog.csdn.net/coder_my_lover/article/details/105237871
今日推荐
周排行