使用application 实现计数器效果,在application中保存整型变量num,需要调用application对象的setAttribute方法,以下选项正确的是( )。
setAttribute(”counter”,num);
setAttribute(num,”counter”);
setAttribute(new Integer(num),”counter”);
setAttribute(“counter”,”num”);