Win a copy of Android Programming: The Big Nerd Ranch Guide this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HFSJ Chapter 7 Page 341  RSS feed

 
Suhas Wadadekar
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The explanation to Question 15 says,

"Options A and D are invalid because only Java statements may be included within <% .... %> tags"

Option D <% import java.util.Date; %> looks pretty much correct Java syntax to me. I must agree I was confused by this answer choice and even confused by the answer/explanation.

Thanks,
Suhas
 
Ankit Garg
Sheriff
Posts: 9610
37
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Everything between the <% and %> goes inside the service method of the converted servlet of the JSP. So if you write <% import java.util.Date; %>, it will look like
 
Suhas Wadadekar
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Makes sense Ankit. Thanks for pointing that out. I was definitely not paying attention to what I was reading.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!