Given req is an HttpServletRequest, which snippet creates a session if one doesn't exist?

  1. req.getSession(false);

  2. req.getSession(true);

  3. both the above

  4. none of the above


Correct Option: B

Find more quizzes: