Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EL question  RSS feed

 
mallika shah
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
${favouriteFood["1"]} GOOD

${favouriteFood["one"]} BAD

if "one" cannot be coerced into an int then an error..
what kind of error would be generated??
A compilation error or a runtime error?


thanks,
mallika
 
Muralidhar Adhikarla
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mallika, it will result in a runtime ELException.
 
mallika shah
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Murlidhar..
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!