移动端

  • 题王微信公众号

    题王微信公众号

    微信搜“题王网”真题密题、最新资讯、考试攻略、轻松拿下考试

计算机考试 | Java认证考试

题库
练习
考试
资讯

模式切换

0 0 0
我的错题 我的收藏 学习笔记

章节目录

单选题 Assume a tag handler extends TagSupport. Which is used within the tag handler to get an attribute “foo” that is in the application scope?()

A

 pageContext.getAttribute(“foo”);

B

 getPageContext().getAttribute(“foo”);

C

 pageContext.getApplicationScope(“foo”);

D

 pageContext.getAttribute(“foo”,pageContext.APPLICATION_SCOPE).getAttribute(“foo”);

E

 getPageContext().getScope(pageContext.APPLICATION_SCOPE).getAttribute(“foo”);

单选题 Which EL expression, inserted at line 3 is valid and evaluated to “beanValue”?()

A

 ${bean}

B

 ${value}

C

 ${beanValue}

D

 ${com.example.bean}

E

 ${requestScope[“com.example.bean”]}

F

 ${request.get(“com.example.bean”).toString()}

单选题 The attribute “name” has a value of “Foo,”   What is the result if this tag handler’s tag is invoked?()

A

 Foo

B

 done

C

 Foodone

D

 An exception is thrown at runtime.

E

 Compilation fails because of an error in this code.

多选题 Which the two are true about the JSTL core iteration custom tags?()

A

 It may iterate over arrays, collections, maps and strings.

B

 The body of the tag may contain EL code, but not scripting code.

C

 When looping over collections, a loop status object may be used in the tag body.

D

 It may iterate over a map, but only the key of the mapping may be used in the tag body.

E

 When looping over integers (for example begin1=’1’ end=’10’), a loop status object may not be used in the tag body.

单选题 What is the result?()

A

 The code compiles and “s=” is printed.

B

 The code compiles and “s=” + s);

C

 The code does not compile because Strings is not initialized.

D

 The code does not compile because Strings cannot be referneed.

E

 The code comiles, but a NullPointer Exception is thrown when toString is called.

单选题 What is the result?()

A

 An exception is thrown.

B

 The code does not compile.

C

 “Hello worlds.” Is printed to the terminal.

D

 The program exits without printing anything.

多选题 Given that a scoped attribute cart exist only in a user’s session, which two, taken independently, ensure the scoped attribute cart no longer exists?()

A

 ${cart = null } 

B

 <c:remove var=”cart” /> 

C

 <c:remove var=”${cart}” /> 

D

 <c:remove var=”cart” scope=”session” /> 

E

 <c:remove scope=”session”>cart</c:remove>

F

 <c:remove var=”${cart}” scope=”session” /> 

G

 <c:remove scope=”session”>${cart}</c:remove>

多选题 Which two choices are equivalent?()

A

 16 > 4

B

 16 / 2

C

 16 * 4

D

 16 >> 2

E

 16 / 22

F

 16 >>> 2

单选题 To implement the design intent, which statement must be inserted at line 42?()

A

 session = response.getSession();

B

 session = request.getSession();

C

 session = request.getSession(true);

D

 session = request.getSession(false);

E

 session = request.getSession(“jsessionid”);

首页 上一页 1 2 3 4 5 尾页 /

到第