Here you can find the source of isAllCharDigit(String str)
public static boolean isAllCharDigit(String str)
//package com.java2s; public class Main { public static boolean isAllCharDigit(String str) { int length = str.length(); if (length == 0) { return false; }//from w ww. j av a 2s.c om for (int i = 0; i < length; i++) { if (!Character.isDigit(str.charAt(i))) { return false; } } return true; } }