Accenture interview question

Question was related to java and testing