'.class' expected AND not a statement
807603Nov 9 2007 — edited Nov 9 2007Getting these two compile errors ('.class' expected AND not a statement) on line 19:
import java.io.*;
import java.lang.*;
import java.util.*;
public class TestReader {
public static void main(String[] arguments) {
try {
FileReader file = new FileReader("vocab.txt");
BufferedReader buff = new BufferedReader(file);
boolean eof = false;
HashMap defMap = new HashMap();
HashMap exMap = new HashMap();
while (!eof) {
String line = buff.readLine();
if (line == null)
eof = true;
else
String[] res = line.split("\t");
defMap.put(res[0], res[1]);
exMap.put(res[0], res[2]);
;
}
buff.close();
// For both the keys and values of a map
for (Iterator it =defMap.entrySet().iterator(); it.hasNext(); ) {
Map.Entry entry = (Map.Entry)it.next();
Object key = entry.getKey();
Object value = entry.getValue();
System.out.println("Key = " + key + " and Value = " + value);
}
} catch (IOException e) {
System.out.println("Error -- " + e.toString());
}
}
}
Any suggestions?
(Thanks!)