Vinculum Solutions interview question

Pattern question and some basic concepts about java