Something is wrong with "Casting"
From: Patricia Klimek (Patricia.Klimek_at_gmail.com)
Date: 11/30/04
- Next message: KiLVaiDeN: "Re: Something is wrong with "Casting""
- Previous message: Fran Garcia: "Re: Best way to do this"
- Next in thread: KiLVaiDeN: "Re: Something is wrong with "Casting""
- Reply: KiLVaiDeN: "Re: Something is wrong with "Casting""
- Reply: Andrew Thompson: "Re: Something is wrong with "Casting""
- Reply: MaSTeR: "Re: Something is wrong with "Casting""
- Reply: John C. Bollinger: "Re: Something is wrong with "Casting""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: KiLVaiDeN: "Re: Something is wrong with "Casting""
- Previous message: Fran Garcia: "Re: Best way to do this"
- Next in thread: KiLVaiDeN: "Re: Something is wrong with "Casting""
- Reply: KiLVaiDeN: "Re: Something is wrong with "Casting""
- Reply: Andrew Thompson: "Re: Something is wrong with "Casting""
- Reply: MaSTeR: "Re: Something is wrong with "Casting""
- Reply: John C. Bollinger: "Re: Something is wrong with "Casting""
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|