Assume that x is a char variable has been declared and already given a value. Write an expression whose value is true if and only if x is a letter.

4
Assume that x is a char variable has been declared and already given a value. Write an expression whose value is true if and only if x is a letter.

LANGUAGE: JAVA

CHALLENGE:

Assume that x is a char variable has been declared and already given a value. Write an expression whose value is true if and only if x is a letter.

SOLUTION:


((x>='A' && x<='Z') || (x>='a' && x<='z'))

4 comments

Add comment