判断字符串是否为数字

Boolean strResult = str.matches("-?[0-9]+.?[0-9]*");
posted @ 2021-09-18 11:18  上单邢道荣  阅读(81)  评论(0)    收藏  举报