Guidewire interview question

Two technical questions in Java