Yes it does, that precisely works in a C program. However was is true for C and I suspect Java is that the C standard does not specify the character set (e.g. ASCII) it specifically states that the characters '0', '1', '2' ... '9' should have consecutive values but does not specify the same for the letters.
What this means is that ('a' < 'z') is actually dependent on the character set you are using, it is TRUE in ASCII and to be quite honest many C/C++ programmers rely on this fact which makes there code slightly non-portable however many many platforms use ASCII so I think we can probably forgive them this.
Here is a working program
-
#include "stdlib.h"
-
#include "stdio.h"
-
-
int main(int argc, char* argv[])
-
{
-
if( 'a' < 'z' ){
-
-
printf( "a is less than z\n" );
-
}
-
-
return EXIT_SUCCESS;
-
}
-