• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in EL

 
Viji Elango
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%
String str = "2";
%>
${str + 4}

Why is the output of this is 4 and not 6.

Will the variable str stored in page scope? If not, where it'll be stored?

Regards,
Viji.
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you want output 6 use code below
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic