I'll be giving the SCWCD a go tomorrow. I've got the enthuware mock exams and got this question and answers:
Identify two statements that are doing the same task.
1. <%= ticket.price %>
2. <%= ticket.getPrice() %>
3. <jsp.getProperty name="ticket" property="price" />
4. <% ticket.getPrice() %>
5. <%= ticket.getPrice(); %>
I chose 2 and 3, but the answer given is 1 and 3. I tried building a test page and option 1 wouldn't compile for me (albeit on Tomcat 6 rather than 5). Am I missing something at this late stage (gulp!) or is the answer given wrong?
Thanks Parth and Ankit
- That was my typo, Enthuware has jsp:property rather than the jsp.property that I had typed. However, the original point still stands that answer 1 wouldn't compile... after reading your replies I'll award myself an extra % for that question :-)