aspose file tools*
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
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: 3775

${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
Similar Threads
EL and Accessing request scope attributes
EL arithmetic question
Trouble understanding evaluation of EL string literal
EL operator
Doubt in HFSJ page-420