• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Mistake in test question

 
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
 
Sheriff
Posts: 21949
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu 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.
 
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you are right.
 
All of the following truths are shameless lies. But what about this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic