Java Professional — Easy
Key points
- The `count()` method in Java returns the number of elements in the stream.
- The return type is `long` to accommodate large numbers of elements.
- It is important to remember the specific return type of each stream operation.
Ready to go further?
Related questions
