Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

withmilk.com

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Identify true statement about the following JSP code:
<%!int access=8;%>
<%=access++ %>
A It prints out 8 when accessed the first time
B It prints out 9 when accessed the first time
C The code will not compile as "access" is a reserved word
D The code will not compile as there is no space before "access
correct answer A
I feel there need to be a space between = and access so D
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%=access++ %>

This is a jsp expression, there does not need to be a space after the equals sign here.
Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic