Write code to check if a string is Number by checking each single letter
//package com.book2s; public class Main { public static void main(String[] argv) { String s = "book2s.com"; System.out.println(isNumber(s)); }/* www .jav a 2 s . c o m*/ public static boolean isNumber(final String s) { if (s == null || s.length() == 0) { return false; } int size = s.length(); for (int i = 0; i < size; i++) { char chr = s.charAt(i); if (chr < '0' || '9' < chr) { return false; } } return true; } }