Java tutorial
//package com.java2s; public class Main { public static boolean isAlphaString(String s) { boolean b = true; for (int i = 0; i < s.length(); i++) { if (!isAlpha(s.charAt(i))) { b = false; break; } } return b; } public static boolean isAlpha(char c) { return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'); } }