Mphasis interview question

Core JAVA