Tech Mahindra interview question

basics of Java Programming, to write code for the given problem, some logical questions