Android examples for java.lang:Character
is String All Number
import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { public static boolean isAllNumber(String content) { Pattern p = Pattern.compile("\\-*\\d+"); Matcher m = p.matcher(content); return m.matches(); }/*from ww w . j ava2 s. c om*/ }