Oracle
1Z0-899 · Question #10
1Z0-899 Question #10: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-899 to reveal the answer and full explanation for question #10. The question stem and answer options stay visible for context.
Question
Given an HttpServletRequest request and an httpServletResponse response: 41. HttpSession session = null; 42. / / insert code here 43. if (session = = null) { 44. / / do something if session does not exist 45. } else { 46. / / do something if session exists 47. } To implement the design intent, which statement must be inserted at line 42?
Options
- Asession = response.getSession ();
- Bsession = request.getSession ();
- Csession = request.getSession (true);
- Dsession = request.getSession (false);
- Esession = request.getSession ("jsessionid");
Unlock 1Z0-899 to see the answer
You've previewed enough free 1Z0-899 questions. Unlock 1Z0-899 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.