Java tutorial
//package com.java2s; public class Main { public static boolean isWhitespace(String s) { boolean ok = true; for (int i = 0; i < s.length(); i++) ok = ok && Character.isWhitespace(s.charAt(i)); return ok; } }