🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Help with enumeration!!

#7542
From: Alex Colic
Date: Tue, 05 Jun 2001 14:46
20 lines
1426 bytes
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: <3b1cf0bb$1_2@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!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,a708827385327fd7,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-06-05 07:51:22 PST
From: "Alex Colic" <alex.colic@pop-ware.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: Help with enumeration!!
Date: Tue, 5 Jun 2001 10:46:09 -0400
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 24.150.29.218
Message-ID: <3b1cf0bb$1_2@dnews>
X-Trace: dnews 991752379 24.150.29.218 (5 Jun 2001 07:46:19 -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