• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mistake in test question

 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

The following is a snippet of JSP code from question 33 of Sun's SCWCD practice exam, Form 1.



They claim that this snippet is the correct answer to a question. But I believe it is mistaken. Notice the use of "colorAssignment.key" and "colorAssignment.value". They use them as if they were beans in EL, but shouldn't they be colorAssignment.getKey() and colorAssignment.getValue()?

Does anyone believe the above is valid code? And if so, can you explain it to me perhaps?

Thanks!
John
 
Rob Spoor
Sheriff
Pie
Posts: 20745
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree; colorAssignment.key is how it would appear in EL, not in an expression.
 
Omar Al Kababji
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you are right.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic