Something is wrong with "Casting"

From: Patricia Klimek (Patricia.Klimek_at_gmail.com)
Date: 11/30/04


Date: 30 Nov 2004 03:03:05 -0800

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



Relevant Pages

  • Re: Something is wrong with "Casting"
    ... "Patricia Klimek" wrote in message ... > the Problem I have is kind of crazy: ... > but if I cast it, ... > I probably can't cast the Vector element, ...
    (comp.lang.java.programmer)
  • Re: Something is wrong with "Casting"
    ... > the Problem I have is kind of crazy: ... > but if I cast it, ... > I probably can't cast the Vector element, ...
    (comp.lang.java.programmer)
  • Re: fuck NIGGER OWNERS MANUAL FUCK!!!
    ... Tell Richard it's classical ringing in particular a ... cast. ... Are you crazy, I mean, coinciding like mental literatures? ...
    (alt.true-crime)
  • Re: Fishing Diplomat
    ... my rod and fished like crazy hoping the guards wouldn't get to me in time. ... You can't cast in combat. ...
    (alt.games.warcraft)
  • Re: Windsurfing days may be over
    ... that are excellent wave sailors and crazy enough to sail with a cast ... I have some pics of him with the cast, ...
    (rec.windsurfing)