jre1.6.0_27 HashMap values() sourcecode

Posted by Liu guanghua on Stack Overflow See other posts from Stack Overflow or by Liu guanghua
Published on 2012-09-28T09:36:37Z Indexed on 2012/09/28 9:37 UTC
Read the original article Hit count: 168

Filed under:
|

Today, I opened jre1.6.0_27 HashMap values() method sourcecode

  389  public Set<K> keySet()
  390  {
  391      Set localSet = this.keySet;
  392      return (this.keySet = new KeySet(null));
  393  }
  394
  395  public Collection<V> values()
  396  {
  397      Collection localCollection = this.values;
  398      return (this.values = new Values(null));
  399  }

I think these sourcecode are error, but I don't know why they look like this. Who can tell me why?

© Stack Overflow or respective owner

Related posts about java

Related posts about hashmap