No, only if you compile it with Java 8. But I think we should write the example as generic as possible.