P
Patricia Klimek
Hey,
the Problem I have is kind of crazy:
I want to cast a vector to Integer and save elementAt(1) in Integer i:
Integer i = (Integer)row.elementAt(1);
It does show me the Element if I do this:
System.out.println(row.elementAt(1));
but if I cast it, it's not working.
System.out.println(row.elementAt(1)); --- is working
Integer id = (Integer)row.elementAt(1); --- is not working
because of the casting
System.out.println("id: " + row.elementAt(1)); --- is not working
Human human = new Human(id); --- is not working
I probably can't cast the Vector element, right?
But how can I do it?
I hope somebody can help me.
Please
Patricia
the Problem I have is kind of crazy:
I want to cast a vector to Integer and save elementAt(1) in Integer i:
Integer i = (Integer)row.elementAt(1);
It does show me the Element if I do this:
System.out.println(row.elementAt(1));
but if I cast it, it's not working.
System.out.println(row.elementAt(1)); --- is working
Integer id = (Integer)row.elementAt(1); --- is not working
because of the casting
System.out.println("id: " + row.elementAt(1)); --- is not working
Human human = new Human(id); --- is not working
I probably can't cast the Vector element, right?
But how can I do it?
I hope somebody can help me.
Please
Patricia