wuxw
2022-07-07 2cf0a9d123324000a241eb163bf2e362678f1061
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.java110.utils.util;
 
public class NumberUtil {
 
    public static boolean isDouble(String var) {
        try {
            Double.parseDouble(var);
        } catch (Exception e) {
            return false;
        }
 
        return true;
    }
 
    public static double getDouble(String var) {
        try {
            return Double.parseDouble(var);
        } catch (Exception e) {
            return 0;
        }
    }
}