chengf
2025-07-25 ee4d1b668d1666cdec803b037ce8181763154bb6
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;
        }
    }
}