Hello,
i write a program that creates many hashTable; it counts the frequency of each word in some document s(that it's very large). So there are many words... This is a part of code. Do you know how come overcome this problem (in general) ?
thanks
Code:
.............................. HashMap<String, Double> frequency = null; for (every document ) { frequency = new HashMap<String, Double>(); //select a word and count frequecny.put( myWord , new Integer (count ) ); } .................................................................
Code:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.HashMap.resize(Unknown Source) at java.util.HashMap.addEntry(Unknown Source) at java.util.HashMap.put(Unknown Source) at MyClass.setting(MyClass.java:71) at filter.main(filter.java:19)