class - What does the syntax mean in Java: new Stream<Integer>(){ ... }? -


I have encountered the following Java syntax, which I do not know.

This part is fine:

  Public abstract class stream & lt; T & gt; Uses the IETATOR & lt; T & gt; {Next in Public Boolean () {Back is true; } Public Zero removal () {new runtime exception ("unsupported operation"); }}  

But I do not get it:

  stream  

What is this?

This is providing an inline (anonymous) stream class sub -category.

Functionally, this is the same:

  Public nuclest stream {public integer next} {return 1; }}  

and

  zero something MethodInAnotherClass {stream stream = new NewClass (); }  

But the definition method of this class is not used outside the body, you can define it as an anonymous form.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -