code: public static boolean isPunc(String str) {
      	if (str == null) return false;
      	str = str.trim();
      	
      	for (int i = 0; i < str.length(); ++i){
      		char c = str.charAt(i);
      		if (Character.isDigit(c) || Character.isLetter(c)){
      			return false;
      		}
      	}
  		return true;
      }
docs: Checks if is punctuation.
  
  @param str the string token to test
  @return true, if the input is one of the punctuation marks