chengf
2025-07-22 b63f41b8a0cfce68770e5cb02c8dd3fd994f0c59
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;
        }
    }
}