Domanda di colloquio di Oracle

Basic java programming questions. couple logical questions