Given:
<jsp:useBean id="baz" class="com.test.Test" type="com.test.Bar" />
Which two are true? (Choose two)
A. An object of type com.test.Test is instantiated and assigned to a variable baz of type com.test.Bar.
B. An object of type com.test.Bar is instantiated and assigned to a variable baz of type com.test.Test.
C. To avoid error, com.test.Bar must be superclass of com.test.Test or an interface implemented by com.test.Test.
D. To avoid error, com.test.Test must be a superclass of com.test.Bar or an interface implemented by com.test.Bar.
Answer: B, D
Given that a scoped attribute cart exists only in a user's session, which two, taken independently, ensure the scoped attribute cart no longer exists? (Choose two.)
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>
Answer: D,E
Incorrect Answers:
Not C: no session scope attribute
Not G: ${cart} will return the VALUE of cart, not the cart variable