Problem with TreeMap and Vector

Hello,

this is the problem I have:

I declare a Vector like this:

Vector<String> theVector = new Vector<String>();

I put the String needed into the Vector:

theVector.add("blabla")

In the other hand I had created a TreeMap like this:

private TreeMap<Integer, Vector><String>> theTreeMap;

I now when I try to put the Key and the Element like this my program crash:

theTreeMap.put(1096,theVector);

I think I don't put the data on the good way in the TreeMap...

Any Idea? Thank you very much

[587 byte] By [kboo80a] at [2007-11-27 4:04:20]
# 1

> ...

> In the other hand I had created a TreeMap like this:

> private TreeMap<Integer, Vector><String>> theTreeMap;

>

> I now when I try to put the Key and the Element like

> this my program crash:

> theTreeMap.put(1096,theVector);

What do you mean?

prometheuzza at 2007-7-12 9:09:12 > top of Java-index,Java Essentials,Java Programming...
# 2

I solve it with another Forum but thank you for your answer :)

I forget the instanciation :

private TreeMap<Integer, Vector><String>> theTreeMap

= new TreeMap<Integer, Vector><String>>();

kboo80a at 2007-7-12 9:09:12 > top of Java-index,Java Essentials,Java Programming...