I have encountered the following Java syntax that I don\'t recognize.
This part is fine:
public abstract class Stream implements Iterator
This is defining a Anonymous class which implements the Stream interface. To implement the interface we need to implement the method next.