Article View: borland.public.jbuilder.java.language
Article #7470Re: Help with enumeration!!
From: dnoyeB
Date: Wed, 20 Jun 2001 19:29
Date: Wed, 20 Jun 2001 19:29
29 lines
1664 bytes
1664 bytes
This is called sleepy head syndrome :) Those are 2am mistakes...
"Alex Colic" <alex.colic@pop-ware.com> wrote in message
news:3b1cf0bb$1_2@dnews...
> Help I am having a wierd problem with a hashtable and an enumeration.
>
> My code is as follows:
>
> Enumeration enum=hash.keys();
>
> while(enum.hasMoreElements());
> {
> String key=(String)enum.nextElement();
> System.out.println(key);
> }
>
> The problem is that the code is indefinately looping at the
> 'while(enum.hasMoreElements());' portion. The actial reading of the key
and
> displaying it never occurs. I have checked and enum.hasMoreElements is
> return true so why is the rest of the statement not being accessed?
>
> Any help in understanding the above is appreciated.
>
> Alex
>
>
Technical Details
Message-ID:
<3b3110f0$1_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3b1cf0bb$1_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,a708827385327fd7 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-06-20 14:16:20 PST From: "dnoyeB" <lamont_gilbert @ rigidsoftware.com> Newsgroups: borland.public.jbuilder.java.language References: <3b1cf0bb$1_2@dnews> Subject: Re: Help with enumeration!! Date: Wed, 20 Jun 2001 15:29:24 -0400 Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 63.68.196.49 Message-ID: <3b3110f0$1_1@dnews> X-Trace: dnews 993071344 63.68.196.49 (20 Jun 2001 14:09:04 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews