I would like to find the biggest number in HashSet and HashMap. Say I have the number [22,6763,32,42,33] in my HashSet and I want to find the largest number in my current HashSet..how would i do this? and Same thing for the HashMap as well. I hope you can help me with it. Thank you.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Consider using Apache Commons Math. Here is the API docs.
The class of interest is SummaryStatistics. It works with
double
s and computes max, min, mean etc. on the fly (as you add values to it). The data values are not stored in memory, so this class can be used to compute statistics for very large data streams.Something like this:
And this: