HP Inc. interview question

Basic Java Concepts, Design patterns