i try to print all elements of the streamex on the console, but I get always this issue
one.util.streamex.StreamEx@2e817b38
So I call "convert" method from the main, but i doesn't work.. Do you have any idea, how can I make it right?
I hope to get helpful answer for my question.
Please post your code it's hard to read the screenshot. From your output it seems you are printing the StreamEx object from convert method. That will not output what you need.
When you print a java object it invokes toString() method which all Objects inherit. By default the toString() method will return a string that lists the name of the class followed by an @ sign and then a hexadecimal representation of the memory location the instantiated object has been assigned to.
This is why you get an output like this,
First you need to iterate the StreamEx stream and then print the object. Notice that in Racer class toString method is overridden. So when we call print on racer object it will invoke toString() method that we have written.
Output: