🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8591

Re: JDK 1.3 Long

#8591
From: John McGrath TeamB
Date: Sat, 10 Mar 2001 09:52
30 lines
2086 bytes
On Fri, 9 Mar 2001 15:23:03 -0600, Daniel Ray wrote:

> java.util.Hashtable h     = (java.util.Hashtable) v.firstElement();
> java.util.Enumeration e = h.keys();
> java.util.Collection c     = h.values();
> java.util.Iterator i          = c.iterator();
> String iString                = i.next().toString();
> // So I won't skip an iteration while degugging.. copy per se
> writeLogEvent("iString is = to " + iString, ERROR);                  // Just
> a log file so I can view what's going on
> writeLogEvent("iString length is " + iString.length(), ERROR);   // Walla !!
> This returns my Id of '0' + 5 whitespaces --  length = 6
> myFunctionId(new Long(iString.trim()));                                  //
> Use trim() to get rid of whitespaces and continue
> 
> I don't understand where the whitespace is coming from.

The string with the "extra" whitespace is coming from the values that 
are in the HashTable.  Since you do not show the code that puts the 
values in the HashTable, it is not possible to tell where the extra 
whitespace comes from.

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.1513a37dd819b03798a048@forums.borland.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!206.252.192.28!news.stealth.net!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail
References: <3aa722bf$1_1@dnews> <3aa72d40$1_2@dnews> <3aa949b9$1_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,f15c1a8a3e4b754d
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-10 01:58:47 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!206.252.192.28!news.stealth.net!nntp1.njy.teleglobe.net!teleglobe.net!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: JDK 1.3 Long
Date: Sat, 10 Mar 2001 04:52:27 -0500
Organization: Another Netscape Collabra Server User
Lines: 30
Message-ID: <MPG.1513a37dd819b03798a048@forums.borland.com>
References: <3aa722bf$1_1@dnews> <3aa72d40$1_2@dnews> <3aa949b9$1_1@dnews>
NNTP-Posting-Host: dslcv1-60.fast.net
X-Newsreader: MicroPlanet Gravity v2.30