多做题,通过考试没问题!

Java认证考试

睦霖题库>其他计算机考试>Java认证考试

You are building a web application with a scheduling component. On the JSP, you need to show the currentdate, the date of the previous week, and the date of the next week. To help you present this information,you have created the following EL functions in the ’d’ namespace: name: curDate; signature: java.util.DatecurrentDate() name: addWeek; signature: java.util.Date addWeek(java.util.Date, int) name: dateString;signature:java.util.String getDateString(java.util.Date) Which EL code snippet will generate the string for the previousweek?

  • A、${d:dateString(addWeek(curDate(), -1))}
  • B、${d:dateString[addWeek[curDate[], -1]]}
  • C、${d:dateString[d:addWeek[d:curDate[], -1]]}
  • D、${d:dateString(d:addWeek(d:curDate(), -1))}
正确答案:D
答案解析:
进入题库查看解析

微信扫一扫手机做题