🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1102

Re: < or >

#1102
From: Chris Smith
Date: Thu, 20 Jun 2002 23:56
13 lines
1329 bytes
Reiz wrote ...
> yes I means to compare strings lexicographiclly.
> I have a solution:

Being very picky here, compareTo is specified to return less than zero, 
zero, or greater than zero.  The specific value returned is an 
implementation detail.  So, that would be better written as:

    if (string1.compareTo(string2) < 0)
    if (string1.compareTo(string2) == 0)
    if (string1.compareTo(string2) > 0)

Chris Smith
Technical Details
Message-ID: <MPG.177c196f6ec6e4ad98a0d9@news.altopia.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.alt.net!usenet
References: <aetafp$9tjac$1@ID-97157.news.dfncis.de> <3d122f57.20062197@news.online.no> <87660d912w.fsf@nbook.wohnheim.uni-kl.de> <aetcb6$9rcg1$1@ID-97157.news.dfncis.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 113ae9,59a0cb87210dc727
X-Google-Attributes: gid113ae9,public
X-Google-Thread: 1089d0,59a0cb87210dc727
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-06-20 16:56:01 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.alt.net!usenet
From: Chris Smith <cdsmith@twu.net>
Newsgroups: borland.public.jbuilder.java.api,comp.lang.java.help
Subject: Re: < or >
Date: 20 Jun 2002 23:56:01 GMT
Organization: Altopia Corp. - Usenet Access - http://www.altopia.com
Lines: 13
Message-ID: <MPG.177c196f6ec6e4ad98a0d9@news.altopia.com>
References: <aetafp$9tjac$1@ID-97157.news.dfncis.de> <3d122f57.20062197@news.online.no> <87660d912w.fsf@nbook.wohnheim.uni-kl.de> <aetcb6$9rcg1$1@ID-97157.news.dfncis.de>
X-Newsreader: MicroPlanet Gravity v2.30