Re: Why is Java lying?
- From: "Karl Uppiano" <karl.uppiano@xxxxxxxxxxx>
- Date: Tue, 28 Nov 2006 21:32:11 GMT
java does not know that that "Object" is a "String".
it does know that "String"s are "Object"s.
I know this doesn't answer the basic question, but if it is just the string
you want,
String attr = e.nextElement().toString();
should work without casting.
.
- References:
- Why is Java lying?
- From: laredotornado
- Re: Why is Java lying?
- From: Thomas Fritsch
- Re: Why is Java lying?
- From: dantarion
- Why is Java lying?
- Prev by Date: How to update a jar file for one source file change?
- Next by Date: (Announce) Jonathan Robie to Present at 2006 XML Conference
- Previous by thread: Re: Why is Java lying?
- Next by thread: context.xml and DataSource
- Index(es):