Article View: borland.public.jbuilder.java.language
Article #746Re: list class
From: Scott
Date: Tue, 21 Dec 2004 16:28
Date: Tue, 21 Dec 2004 16:28
40 lines
2787 bytes
2787 bytes
That piece of code definately seemed to do the job, however instead of a blank it return the word null. Is there a way to have the blank space listed instead? Sorry to be such a pest, but I'm sort of learning this on my own and am always looking for more info. Appreciate your help, and the others in this group.Once I have this done, I have other things that i'd like to play around with. I want to make a class similar to a dictionary that does has the same methods as this one. (I know one word and using a dictionary I get a bunch of other words, the definition). Basically methods similar to the previous stuff. I got this example out of a text book I picked up at the library, however it doesn't have the answers and I'm kind of lost. Any help would be appreciated. thanks Scott Dictionary() - hold 4 entries Dictionary(int n) - holds n entries void add(String key, String value) - add the key/value plair to the dictionary. Also needs to be abble to change size void remove (String key)- remove key/value pair from the dictionary known by the key String lookup(String key) - returns the value associated with the key, if the key is not there return null String[] lookupPart(String keyPart) - return a list of values whose keys have keyPart as a substring String[] reverseLookup(String valuePart) - similar to above Boolean contains(String key) - returns true/false is the key is in the dictionary String to String() - returns a prinable representation of the dictionary, alphabetized by key.
Technical Details
Message-ID:
<IaYxd.12520$Ae.9292@newsread1.dllstx09.us.to.verio.net>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!mpls-transit-01.news.qwest.net!newspeer1.dllstx09.us.to.verio.net!verio!newsread1.dllstx09.us.to.verio.net.POSTED!53ab2750!not-for-mailReferences:
<0Nkwd.12381$Ae.6831@newsread1.dllstx09.us.to.verio.net> <41c82ae7$0$22342$3b214f66@aconews.univie.ac.at> <zDWxd.12514$Ae.10718@newsread1.dllstx09.us.to.verio.net> <41c847c2$0$26996$3b214f66@aconews.univie.ac.at>Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,62cee13431c73458 X-Google-Attributes: gidf74b3,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!mpls-transit-01.news.qwest.net!newspeer1.dllstx09.us.to.verio.net!verio!newsread1.dllstx09.us.to.verio.net.POSTED!53ab2750!not-for-mail From: "Scott" <swurm@suffolk.lib.ny.us> Newsgroups: borland.public.jbuilder.java.language References: <0Nkwd.12381$Ae.6831@newsread1.dllstx09.us.to.verio.net> <41c82ae7$0$22342$3b214f66@aconews.univie.ac.at> <zDWxd.12514$Ae.10718@newsread1.dllstx09.us.to.verio.net> <41c847c2$0$26996$3b214f66@aconews.univie.ac.at> Subject: Re: list class Lines: 44 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Message-ID: <IaYxd.12520$Ae.9292@newsread1.dllstx09.us.to.verio.net> Date: Tue, 21 Dec 2004 11:28:23 -0500 NNTP-Posting-Host: 209.139.23.142 X-Complaints-To: abuse@verio.net X-Trace: newsread1.dllstx09.us.to.verio.net 1103646504 209.139.23.142 (Tue, 21 Dec 2004 16:28:24 GMT) NNTP-Posting-Date: Tue, 21 Dec 2004 16:28:24 GMT Organization: NTT/VERIO