Meaningless Drivel is fun!*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes EL Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "EL Question" Watch "EL Question" New topic
Author

EL Question

deepa raj
Ranch Hand

Joined: Jul 25, 2008
Posts: 124



container will check an find the account attribute and it will try to call
getPersonalChecking method.

am i right??
Amruth Puppala
Ranch Hand

Joined: Jul 14, 2008
Posts: 295
Container will find wether this account is Attrbute or bean or map otherwise throws Exception. then try to call getPersonalChecking method


SCJP 5 |SCWCD 5| Started thinking about Web Services ?
deepa raj
Ranch Hand

Joined: Jul 25, 2008
Posts: 124
if so what is the answer for this question from HFSJ Mock exam 2


Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

getter methods for booleans are not getXXX but isXXX.


[My Blog]
All roads lead to JavaRanch
Sandeep Bhandari
Ranch Hand

Joined: Apr 16, 2004
Posts: 201
my take is option C.

what's the official answer?


SCJP 96% | SCWCD 90%| SCJP mock exams | My SCJP blog
deepa raj
Ranch Hand

Joined: Jul 25, 2008
Posts: 124
Answers are A,B,C
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
A. <c:if test='${account.personalChecking}'>Checkingthat fits your lifestyle.</c:if>B. <c:if test='${account["personalChecking"]}'>Checkingthat fits your lifestyle.</c:if>C. <c:if test="${account[�personalChecking']}">Checkingthat fits your lifestyle.</c:if>D. <c:if test='${account.isPersonalChecking}'>Checkingthat fits your lifestyle.</c:if>



Here we can't use the D option because in EL you can never invoke a method(isPersonalChecking) on the object(account).

In EL you can always access the property of a object.

As this method name is following the name convention... isXXX

So here PersonalChecking turns out to be a property.

So in the first three options, its trying to access the bean or object(account) property(PersonalChecking).

Makes Sense?

Cheers...


SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EL Question