• 2022-06-07
    【单选题】对于以下标签[br][/br]它与下列哪个选项中的Java程序片段等价
    A: %CounterBean myBean=(CounterBean)request.getAttribute(“myBean”);if(myBean==null)myBean = new CounterBean();%
    B: %CounterBean myBean=(CounterBean)request.getAttribute(“myBean”);if(myBean==null){myBean = new CounterBean();request.setAttribute(“CounterBean”,myBean);}%
    C: %CounterBean myBean=(CounterBean)request.getAttribute(“myBean”);if(myBean==null){myBean = new CounterBean();request.setAttribute(“myBean”,myBean);}%
    D: %CounterBean myBean=new CounterBean();request.setAttribute(“myBean”,myBean);%
  • 举一反三