Morgan Stanley interview question

What is the purpose of an interface in Java?