Keystone Logic interview question

Basic java and Object oriented program