4 Topics

Member Avatar for
Member Avatar for freedomflyer

Hello everyone. I have a TreeSet<State> that I want to iterator over in order to change the States within the TreeSet (more specifically, a private subclass within each state). However, I will most likely run into problems as I do something like this, or something to this effect: [CODE]for(State s …

Member Avatar for freedomflyer
0
1K
Member Avatar for kweigand

I am creating methods that will extract info out of a text file. The program is for a real estate office manager who needs to run reports on property listings. The text file will contain property number, property type, price, and agent id as follows. [CODE]110001 commercial 500000.00 101 110223 …

Member Avatar for ~s.o.s~
0
668
Member Avatar for solomon_13000

The result for the code below is "ex [6, 7, b, d] [6, 7, b]". Therefore I am wondering how did the exception take place and why is the value 3 missing? [CODE] import java.util.*; public class Exam6 { public static void main(String[] args){ TreeSet<String> t1 = new TreeSet<String>(); TreeSet<String> …

Member Avatar for JamesCherrill
0
121
Member Avatar for Skyelher

[CODE]TreeSet goodWords = new TreeSet(); ... Iterator iterGoodWords = goodWords.iterator(); while (iterGoodWords.hasnext()) { String word = iterGoodWords.next(); System.out.println(word); }[/CODE] Tell me, why doesn’t that print anything even if there are some items in the goodWords collection? I know there are items in the set because when I check the size, …

Member Avatar for Skyelher
0
169

The End.