摘要: public static void main(String[] args) { String aString="w14-rq22.3"; //只保留数字 aString = aString.replaceAll("[^(0-9)]",""); System.out.println(aString) 阅读全文
posted @ 2020-06-21 14:02 遗忘无际 阅读(101) 评论(0) 推荐(0)
摘要: public static void main(String[] args) { double a = 0; double b = 11.0; System.out.println(String.format("%.2f", a)); System.out.println(String.format 阅读全文
posted @ 2020-06-21 13:43 遗忘无际 阅读(130) 评论(0) 推荐(0)