C
Conor
Hi,
I have the following code which uses hashmaps within hashmaps to store
different views on a set of objects depending on their attributes:
class MCPStore {
HashMap<String, HashMap> categories = new HashMap<String, HashMap>();
HashMap<String, ArrayList> processes = new HashMap<String,
ArrayList>();
categories.put("pname", processes);
....
}
When I compile the above code I get the following error:
$ javac MCPStore.java
MCPStore.java:11: <identifier> expected
categories.put("processes", processes);
^
Can anyone explain why this is, as I'm stumped.
Thanks,
Conor
I have the following code which uses hashmaps within hashmaps to store
different views on a set of objects depending on their attributes:
class MCPStore {
HashMap<String, HashMap> categories = new HashMap<String, HashMap>();
HashMap<String, ArrayList> processes = new HashMap<String,
ArrayList>();
categories.put("pname", processes);
....
}
When I compile the above code I get the following error:
$ javac MCPStore.java
MCPStore.java:11: <identifier> expected
categories.put("processes", processes);
^
Can anyone explain why this is, as I'm stumped.
Thanks,
Conor