2013-04-30 119 views
0

我正在努力實施一項計劃,該計劃涉及爲英語所有diphones立法所需的最低字數。如何解決這個'Variable DeclaratorID'錯誤?

我已經使用HashSet來創建diphonetic字典,我現在希望將其轉換爲TreeSet以排序diphones。錯誤代碼的一個片段如下:

dictDiphonesSet = new TreeSet<String>(dictDiphonesHashSet); 

Set<String> unusedDiphonesSet = new HashSet<String>(diphoneSet); 

unusedDiphonesSet.removeAll(dictDiphonesSet); 

diphoneSet.removeAll(unusedDiphonesSet); 

List<DiphoneticDict> diphoneticDictNoRptDiphones = new ArrayList<DiphoneticDict>(); 

StringTokenizer subStrDiphone = null; 

Boolean diphoneRepeats = false; 

違規代碼拋出了一個「VariableDeclaratorID」錯誤(dictDiphonesHashSet),這是整個的我的代碼的其餘部分重複的誤差。任何人都可以爲我提供任何幫助,以便我可以就立法這些錯誤採取行動嗎?

我對編碼比較陌生,有點困惑!

此致敬禮。

+1

你能發佈整個錯誤信息嗎? – 2013-04-30 20:13:19

回答

0
Set<String> dictDiphonesSet = new TreeSet<String>(dictDiphonesHashSet); 

除非您已在其他地方聲明dictDiphonesSet變量。