Here you can find the source of isNumber(String s)
private static Boolean isNumber(String s)
//package com.java2s; /**//from w w w . j a v a2 s . c o m * Copyright (c)2010-2011 Enterprise Website Content Management System(EWCMS), All rights reserved. * EWCMS PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * http://www.ewcms.com */ import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main { private static Boolean isNumber(String s) { Pattern pa = Pattern.compile("[0-9]*"); Matcher ma = pa.matcher(s); if (ma.matches()) { return true; } return false; } }