Java tutorial
//package com.java2s; public class Main { public static boolean isNumber(String validString) { byte tempbyte[] = validString.getBytes(); for (int i = 0; i < validString.length(); i++) { if (tempbyte[i] < 48 || tempbyte[i] > 57) { return false; } } return true; } }