dJava Factory interview question

Technical question and the tech i used before