Bitwise Interview Question

OOPS, two coding questios and questions from Java