This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubt in EL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubt in EL" Watch "Doubt in EL" New topic

Doubt in EL

Shruthi Sam
Ranch Hand

Joined: Jul 09, 2008
Posts: 73
In HFSJ, page no: 398

Given Servlet Code:

The question is: The following will print what?

The answer given is "true". Can anybody please clarify this?

What i thought was...

list[0] - true
list[1] - false

it will be ${true || false and true}

${true || false}

==> false

Please clarify.
Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3900

${true || false}
==> false

Is that how "||" (logical OR) operator works?

[How to ask questions] [Twitter]
Shruthi Sam
Ranch Hand

Joined: Jul 09, 2008
Posts: 73

Thanks for pointing it out. Somehow i mistook.
I agree. Here's the link:
subject: Doubt in EL
It's not a secret anymore!