int testVal = 2000003;if( ( testVal >> 1 ) << 1 == testVal ) { System.out.println( "even!" );}else { System.out.println( "odd!" );}