Java tutorial
//package com.java2s; //License from project: Open Source License import java.util.StringTokenizer; public class Main { public static boolean valiChar(String string) { StringTokenizer s = new StringTokenizer(string, ","); // int num=0; if (s.hasMoreTokens()) { String str = s.nextToken(); byte[] cc = str.getBytes(); int a = (int) cc[0]; if (a < 32 || a > 127) { return false; } } return true; } }