I was wondering why I had this error when I tried to do this :
Map<Integer, List<String>> map = (Map<Integer, List<String>>) parameters;
for(Integer i : map.keySet()) {
tableFiles.setWidget(row, 0, addPanelFile(String.valueOf(i)));
row++;
for(map.get(i)) {
}
}
Why can't i be resolved to a variable ?
The for-loop is malformed.
Change
for(((Map<Integer, List<String>>) parameters).get(i)) {
}
into
for(SomeType someVar : ((Map<Integer, List<String>>) parameters).get(i)) {
}
and you should get a better error-message.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With