Mega Code Archive
Categories
/
Android
/
Date Type
Is a string a Number
import java.math.BigDecimal; class Main { public static boolean isNumber(String text) { try { new BigDecimal(text); return true; } catch (Exception e) { return false; } } }