Android examples for java.lang:String Parse
is String an Int number
//package com.java2s; public class Main { static public boolean isInt(String text) { if (text != null && text.length() > 0) { if (!isNumeric(text.charAt(0)) && text.charAt(0) != '-' && text.charAt(0) != '-') return false; for (int i = 1; i < text.length(); ++i) if (!isNumeric(text.charAt(i))) return false; return true; }/* www . j av a2s . c o m*/ return false; } static public boolean isNumeric(char c) { return c >= '0' && c <= '9'; } }