Accenture interview question

Java related queries