Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: Question about HashMap and Map.Entry ... Date: Sat, 01 Sep 2012 11:06:17 +0200 Lines: 16 Message-ID: References: <35O%r.171$_I7.84@newsfe20.iad> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net Fs7tPOXF0dNyc80pSJNwAwfGuyA+p1OdTcf0tVbn8PiyQf8JkagJY/B1YQTPCNI60= Cancel-Lock: sha1:TaQmR0pkjBpn/NDS0XNFpATIGgM= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120827 Thunderbird/15.0 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:18497 On 08/31/2012 08:22 PM, Daniel Pitts wrote: > The real reason IMHO to use "long" over "Long", is that Long can be > null, and sometimes that just doesn't make any sense semantically. The > fact that it tends to be faster and use less memory is just a benefit. > > Same goes for all primitives vs primitive wrappers. Definitively agree. I mentioned it only as an additional benefit. Another reason to use object types is of course that the data structure is a generic one (such as keys or values in a Map) so there is no other option. :-) Kind regards robert