【单选题】给定 HttpServlet 请求对象 request 以及 HttpServlet 响应对象 response ,下面哪条语句能够在 servlet 中创建 cookie"username" ,并将值设为 "joe"
A.
request.addCookie ("username". "joe")
B.
response.addCookie (new Cookie ("username", "joe"))
C.
response.addCookie (username", "joe"))
D.
request.addCookie (new Cookie ("username", "joe"))