public static boolean isAlphaNumeric(String str)
	{
		for (char c : str.toCharArray()) {
			if (!isDigit(c) && !isLetter(c)) {
				return false;
			}
		}
		return true;
	}
public static boolean isAlphaNumeric(String str)
	{
		for (char c : str.toCharArray()) {
			if (!isDigit(c) && !isLetter(c)) {
				return false;
			}
		}
		return true;
	}
public static boolean isAlphaNumeric ( String str ) { for ( char c : str . toCharArray ( ) ) { if ( ! isDigit ( c ) && ! isLetter ( c ) ) { return false ; } } return true ; }
Returns whether the given {@code String} is an alphanumeric sequence,
that is, a sequence which only contains letters and digits.

@param str the {@code String} to test.

@return whether the given {@code String} is an alphanumeric sequence.

@throws NullPointerException if {@code str} is {@code null}.
Returns whether the given { @code String } is an alphanumeric sequence that is a sequence which only contains letters and digits .