Java program to check consecutive letters. The binary representation of 4 is 0100.