Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Java | answer all the questions 9. If a getter of a JavaBean returns a boolean v

ID: 3700469 • Letter: J

Question

Java | answer all the questions

9. If a getter of a JavaBean returns a boolean value, then it must use the prefix is

(a) true

(b) false

10. Which of the following appears in both the JSP implicit objects and the EL implicit objects?

(a) param

(b) header

(c) session

(d) pageContext

11. There exists a JSP element in which an EL expression can be used?

(a) true

(b) false

12. Every time when a <jsp:useBean> tag is processed, a new bean is created.

(a) true

(b) false

13. Suppose that book is the name of a parameter in an HTTP request. Then the expressions ${param.book} and ${paramValues.book[0]} always return the same value.

(a) true

(b) false

14. The first named variable in an EL expression can be the name of a local variable in a JSP scriptlet.

(a) true

(b) false

15. Suppose a Java class of concrete type has only one constructor with two parameters. Can we use this class as the value of the class attribute in the <jsp:useBean> tag?

(a) yes

(b) no

16. In a JSP, a bean means a JavaBean object that follows the JavaBean specification.

(a) true

(b) false

Explanation / Answer

9. true

for boolean datatype returning methods in bean, the prefix should be 'is', for other datatypes it should be 'get'

example : public Boolean isProcessEnabled()

{.....}

10. (d) pageContext

pageContext is an object of JSP , as well as it appears in Expression language also as an object

11. true

there are various JSP elements like 'output' etc. where EL can be used

12. false, it it does not find an existing bean, then only it creates a new bean

13. false

both can return different values

14. true

first name in EL can be any localVariable name also, it depends on the usage and requirement

15. no

jsp:useBean will look for the default contructor, if not found it will give error.

16. true

in the conext of JSP, beans are called as JavaBeans

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote