I\'ve got a simple java assignment. I need to determine if a string starts with the letter A through I. I know i have to use string.startsWith(); but I don\'t want to write,
How about this for brevity?
if (0 <= "ABCDEFGHI".indexOf(string.charAt(0))) { // string starts with a character between 'A' and 'I' inclusive }