• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question getting attributes  RSS feed

 
Ronaldo Nazario
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


why does this code generate a compile time error?
When a getAttribute() can't find the attribute it returns null, right?
 
Thuwaragan Sundaramoorthy
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


There will be a type conversion error. Use type casting.
 
Michael Ku
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the future when you are asking why a compiler error occured or an exception occurs please post the error message along with the code

Thank you
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!