单项选择题

A.String name =session.getParameter(“username”);
B.String name =session.getAttribute(“username”);
C.String name =(String)session.getParameter(“username”);
D.String name =(String)session.getAttribute(“username”);