File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in EL

 
Shruthi Sam
Ranch Hand
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 3908
9
Chrome Fedora Hibernate
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
${true || false}
==> false


Is that how "||" (logical OR) operator works?
 
Shruthi Sam
Ranch Hand
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops....Sorry...

Thanks for pointing it out. Somehow i mistook.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic