怎么在JAVA在字符串中提取整数和浮点数啊字符串自己输入。用正则吗?
可以采用正则表达式的方式
public static void main(String[] args) {//整数或浮点数System.out.println("0.00".matches("\d+(\.\d+)?"));}