Search:

Type: Posts; User: Norm

Search: Search took 0.11 seconds.

  1. Re: HashMap , trying to get the size of the value and NOT the keys.

    What about the case where adding a new key replaces an existing key?
  2. Re: HashMap , trying to get the size of the value and NOT the keys.

    I think the number of values matches the number of keys. The keys will be unique, but it is possible for there to be duplicate values. In fact all the values could be the same so that there would...
  3. Re: HashMap , trying to get the size of the value and NOT the keys.

    Are you asking for how many (a count) values there are in a HashMap?
    There is one value for each key.
    So if you know the number of keys, there will be that number of values.
  4. Re: HashMap , trying to get the size of the value and NOT the keys.

    Sorry, I still don't understand what you mean by "size". Can you give some examples?
    For example:
    "adf" has a length of 3
    {1, 2, 3, 4} has a length of 4
  5. Re: HashMap , trying to get the size of the value and NOT the keys.

    What is the "size" of a value?

    Should the value returned by the put() method be used?
Results 1 to 5 of 5