I recommend having a look at this topic and this one (about exactly the same code snippet), this thread (also similar code snippet and an additional one) and this thread (about casting or using instanceof operator on a class vs an interface).
Hope it helps!
PS. On CodeRanch, when you copy questions from a book, mock exam or other source, you are required to QuoteYourSources. This time I updated the subject and added the source for you!