Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java | Answer them all 15. Given a JSP page with the line: ${101 % 10} What will be displayed? (a)1 (b)10 (c)1001 (d)101 %

Java | Answer them all

15. Given a JSP page with the line:

${101 % 10}

What will be displayed?

(a)1

(b)10

(c)1001

(d)101 % 10

(E){101 % 10}

16. If in a JSP there are the following two lines,

when you display the EL expression${newcolor}, what will you see?

(a)red

(b)red

(c)red

(d)red

17. Assume that the named variable mylist is a Listobject, and it contains

at least 5 elements. Which of the following expressions sometimes valid and some-

times invalid?

(a)${mylist[3]}

(b)${mylist["4"]}

(c)${mylist["idx" + 2]}

(d)${mylist[idx + 2]}

18. Which of the following ways can be used to separate the nullvalue and the empty string?

(a)using the length function in the JSTLs function package

(b)using the empty operator, like${empty somevar}, to check

(c)comparing the value to null, like ${somevar == null}

19. Which statements about the.(dot) and[]EL operators are true? (Choose all that apply.)

(a)${foo.bar} is equivalent to ${foo["bar"]}

(b)${foo["5"]} is valid syntax if foo is a Map

(c)${header.User-Agent} is equivalent to ${header[User-Agent]}

(d)${header.User-Agent} is equivalent to ${header["User-Agent"]}

(e)${foo[5]} is valid syntax if foo is a List or an array

20. Which of the following pair of expressions are always equivalent? (Assume that allthe leading named variables are valid objects that are notnull.)

(a)${mybean.myval} and ${mybean[myval]}

(b)${myobj["4"]} and ${myobj[4]}

(c)${header.User-Agent} and ${header[User-Agent]}

(d)${mydata.myname} and ${mydata["myname"]}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions

Question

Know the principles of effective service recovery systems.

Answered: 1 week ago

Question

Explain the service recovery paradox.

Answered: 1 week ago