Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.utanet.at!newscore.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail Newsgroups: comp.lang.java.programmer From: Andreas Leitgeb Subject: Re: Arithmetic overflow checking References: <015aeb15-57db-48ab-9cd4-77f8448b632f@w24g2000yqw.googlegroups.com> <2rydnez7l-H5BYnTnZ2dnUVZ_vGdnZ2d@earthlink.com> <4e278a67$0$309$14726298@news.sunsite.dk> <1SSVp.69032$_I7.18660@newsfe08.iad> Reply-To: avl@logic.at User-Agent: slrn/pre0.9.9-111 (Linux) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: Date: 21 Jul 2011 12:32:37 GMT Lines: 9 NNTP-Posting-Host: gamma.logic.tuwien.ac.at X-Trace: 1311251557 tunews.univie.ac.at 73248 128.130.175.3 X-Complaints-To: abuse@tuwien.ac.at Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6336 supercalifragilisticexpialadiamaticonormalizeringelimatisticantations wrote: > On 21/07/2011 6:05 AM, Arved Sandstrom wrote: >> ... Why don't you write a proper class for your data type? > In four words: Lack of operator overloading. > Math on non-primitive types is *painful* in Java. agreeCount = agreeCount.plus(AgreeCount.ONE) on painfulness of non-primitive math.