• 2021-04-14
    阅读下面代码: Book book = BookDB.getBook(id); HttpSession session = req.getSession(); List cart = (List) session.getAttribute("cart"); if (cart == null) { cart = new ArrayList(); session.setAttribute("cart", cart); } cart.add(book); 下面选项中,哪个是对上述代码功能的正确描述?()
  • 举一反三