SCWCD(310-083)

单选题You are building a dating web site. The client’s date of birth is collected along with lots of other information.You have created an EL function with the signature: calcAge(java.util.Date):int and it is assigned to the name, age, in the namespace, func

题目
单选题
You are building a dating web site. The client’s date of birth is collected along with lots of other information.You have created an EL function with the signature: calcAge(java.util.Date):int and it is assigned to the name, age, in the namespace, funct. In one of your JSPsyou need to print a special message to clients who are younger than 25.  Which EL code snippet will returntrue for this condition?()
A

${calcAge(client.birthDate) < 25}

B

${calcAge[client.birthDate] < 25}

C

${funct:age(client.birthDate) < 25}

D

${funct:age[client.birthDate] < 25}

E

${funct:calcAge(client.birthDate) < 25}

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

有以下程序:includeincludeusingnameSpacestd;classperson{ intage; Char*nam

有以下程序:

include <iostream>

include <string>

using nameSpace std;

class person

{

int age;

Char * name;

public:

person ( int i, Char * str )

{

int j;

j = strlen( str ) + 1;

name = new char[ j ];

strcpy( name, str );

age = i;

}

~person()

{

delete name;

cout<<"D";

}

void display()

{

cout<<name<<":"<<age;

}

};

int main()

{

person demo( 30,"Smith" );

demo.display();

return 0;

}

则该程序的输出结果为:【 】。


正确答案:Smith:30 D
Smith:30 D 解析:本题考核类与对象的操作。主函数中定义类person的对象 demo,并赋初值(30,"smith")。然后调用成员函数display()输出赋值结果,即Smitch:30。程序结束时demo对象的析构函数被调用,再输出“D”。

第2题:

下列程序的输出结果为 main() { union u {char *name; int age; int income;}s s.name="WANGLIONG"; s.age=28; s.income=1000; printf("%d\n",s.age); }

A.28

B.1000

C.0

D.不确定


正确答案:B
解析: 本题对共用体的使用进行了考查。由于共用体所有成员共同占据一段存储空间,所以对成员变量的赋值,后面的赋值会覆盖掉前面的赋值,因为s.income=1000;是最后一次成员变量赋值,变量age与变量income共同占据一段存储空间,所以age的值也为1000。

第3题:

With a clear purpose, definite target market, targeted goals, a domain name and a clear structure, you are now ready to begin building the pages for your successful web site.()

此题为判断题(对,错)。


正确答案:正确

第4题:

You are building a dating web site. The client’s date of birth is collected along with lots of other information.The Person class has a derived method, getAge():int, which returns the person’s age calculated from thedate of birth and today’s date. In one of your JSPs you need to print a special message to clients within theage group of 25 through 35. Which two EL code snippets will return true for this condition? ()

  • A、${client.age in [25,35]}
  • B、${client.age between [25,35]}
  • C、${client.age between 25 and 35}
  • D、${client.age <= 35 && client.age >= 25}
  • E、${client.age le 35 and client.age ge 25}

正确答案:D,E

第5题:

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

第6题:

Youarebuildingawebapplicationwithaschedulingcomponent.OntheJSP,youneedtoshowthecurrentdate,thedateofthepreviousweek,andthedateofthenextweek.Tohelpyoupresentthisinformation,youhavecreatedthefollowingELfunctionsinthe’d’namespace:name:curDate;signature:java.util.DatecurrentDate()name:addWeek;signature:java.util.DateaddWeek(java.util.Date,int)name:dateString;signature:java.util.StringgetDateString(java.util.Date)WhichELcodesnippetwillgeneratethestringforthepreviousweek?

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

第7题:

You are building a dating service web site. Part of the form to submit a client’s profile is a groupIIof radio buttons for the person’s hobbies: 20.Hiking 
21.Skiing 
22.SCUBA Diving 23. After the user submits this form, a confirmation screen is displayed with these hobbies listed. Assume thatan application-scoped variable, hobbies, holds a map between the Hobby enumerated type and the displayname. Which EL code snippet will display Nth element of the user’s selected hobbies?()

  • A、${hobbies[hobbyEnum[N]}
  • B、${hobbies[paramValues.hobbyEnum[N]]}
  • C、${hobbies[paramValues@’hobbyEnum’@N]}
  • D、${hobbies.get(paramValues.hobbyEnum[N])}
  • E、${hobbies[paramValues.hobbyEnum.get(N)]}

正确答案:B

第8题:

Your Web site uses custom Themes. Your Web site must support additional Themes based on the user‘s company name. The company name is set when a user logs on to the Web site. The company‘s Theme name is stored in a variable named ThemeName. You need to use this variable to dynamically set the Web site‘s Theme.What should you do?()

A.

B.

C.

D.


参考答案:C

第9题:

You are building a dating web site. The client’s date of birth is collected along with lots of other information.You have created an EL function with the signature: calcAge(java.util.Date):int and it is assigned to the name, age, in the namespace, funct. In one of your JSPsyou need to print a special message to clients who are younger than 25.  Which EL code snippet will returntrue for this condition?()

  • A、${calcAge(client.birthDate) < 25}
  • B、${calcAge[client.birthDate] < 25}
  • C、${funct:age(client.birthDate) < 25}
  • D、${funct:age[client.birthDate] < 25}
  • E、${funct:calcAge(client.birthDate) < 25}

正确答案:C

第10题:

Given an EL function foo, in namespace func, that requires a long as a parameter and returns a Map, which two are valid invocations of function foo?()

  • A、 ${func(1)}
  • B、 ${foo:func(4)}
  • C、 ${func:foo(2)}
  • D、 ${foo(5):func}
  • E、 ${func:foo(“easy”)}
  • F、 ${func:foo(“3”).name}

正确答案:F

更多相关问题