Xerox interview question

Question from core java and SQL