This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

mock exam question  RSS feed

 
rick collette
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which jsp lines are correct?
1) <%! String myString=�Hello� %>
2) <% String myString=request.getServerName() %>
3) <%= out.print(�Hello�) %>
4) <%= �Hello� %>
I know 30 is wrong, and 4) is correct. Why 1) and 2) are wrong?
 
James Kwan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rick,
1) and 2) are wrong because the semicolon is missing.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!