You need to place all statements after the declarations in a code block, e.g. method rather than the class block. Logically it probably makes sense to place all statements in the code block but the non-declarative statements need to be enclosed within the new block
private void processFile() {
data.put(“1”, new Object[]{“ID”,”NAME”, “LASTNAME”}); // <--Syntax error
...//snip
} catch (Exception e) {
e.printStackTrace();
}
}
Issue resolved. I created a new project in Eclipse, added the POI (jar) to the libraries and the syntax error is no longer displayed.