Oracle
1Z0-899 · Question #6
Given the JavaBean class: public class MyBean { private Boolean roasted = false; public MyBean () {} public Boolean isRoasted () { returned roasted } public void setRoasted (Boolean roasted) {…
The correct answer is A. the page will include the output false. See the full explanation below for the reasoning.
Question
Given the JavaBean class: public class MyBean { private Boolean roasted = false; public MyBean () {} public Boolean isRoasted () { returned roasted } public void setRoasted (Boolean roasted) { this.roasted = roasted; ] } Assume a controller has created an instance of this bean, called setRoasted (true), and inserted the bean into the application scope using the name "myBean". A JSP contains these two tags: <jsp: useBean id = "aBean" class = "MyBean" scope = "page" \ /> <jsp: getProprty name = "aBean" property = "roasted" \ /> Which is true?
Options
- Athe page will include the output false
- Bthe page will include the output
- Cthe page will report that the property roasted does not exist
- Dthe page will report that the syntax of the useBean tag is incorrect
- Ethe page will report that the syntax of the getProperty tag ls incorrect
How the community answered
(23 responses)- A78% (18)
- B4% (1)
- C13% (3)
- E4% (1)
Community Discussion
No community discussion yet for this question.