Page 1 of 1
About Question enthuware.jwpv6.2.1158 :
Posted: Mon Aug 15, 2016 1:41 pm
by johnlong
<%= new Date() %> would be valid only if java.util.date is imported
<%= new java.util.Date() %> would be correct answer.
The question is ambiguous.
Re: About Question enthuware.jwpv6.2.1158 :
Posted: Mon Aug 15, 2016 3:04 pm
by admin
You will find questions in the exam where you have to assume that the given code is in a valid context.
This question is about JSP expressions and not about using Date class. So you will need to assume that appropriate import is in place.
BTW, you could have a custom Date class in default package. So no import is necessary in that case.
HTH,
Paul.
Re: About Question enthuware.jwpv6.2.1158 :
Posted: Tue Aug 16, 2016 12:07 pm
by johnlong
Still not convinced with your explanation. Thanks anyway.