Thursday, 12 September 2013

Casting required for variable assignment?

Casting required for variable assignment?

I am new to Android. One thing slowing coding down tremendously is the
errors generated by a statement like:
String logoPath = infoMap.get("LogoPath");
which seems to require an explicit cast to String in order to be accepted
e.g.
String logoPath = (String)infoMap.get("LogoPath");
Can this explicit cast requirement be turned off? I am already telling the
compiler to expect a string...

No comments:

Post a Comment