直接返回会话对象
当服务器已经创建了会话对象就返回该对象,否则返回null
直接返回null
当服务器已经创建了会话对象就返回该对象,否则新建一个会话对象并返回
第1题:
A.public delegate int PowerDeviceOn(bool result, DateTime autoPowerOff);
B.public delegate bool PowerDeviceOn(object sender, EventArgs autoPowerOff);
C.public delegate void PowerDeviceOn(DateTime autoPowerOff);
D.public delegate bool PowerDeviceOn(DateTime autoPowerOff);
第2题:
A.bool('')
B.bool(1)
C.bool(0)
D.bool([])
第3题:
在jsp页面声明中定义了一个方法,下列( )代码不能放入该方法中
public void test(HttpServletReqeust request)
{
}
A、HttpSession session =request.getSession();
B、String name=(String)request.getAttribute("name");
C、String name=(String)session.getAttibute("name");
D、request.sendRedirect(“index.jsp”);
第4题:
在MySQL中图片以()格式存储。
第5题:
下面均为Java关键字的一组是()
A、boolean,byte,long,true
B、byte, long,true,goto
C、goto ,Boolean,byte,true
D、bool, long,true,auto
第6题:
A.public delegate int PowerDeviceOn(bool, DateTime);
B.public delegate bool PowerDeviceOn(Object, EventArgs);
C.public delegate void PowerDeviceOn(DateTime);
D.public delegate bool PowerDeviceOn(DateTime);
第7题:
有如下程序:
}}}}include<iostream>
using namespace std;
class Pair{
int m;
int n;
public:
Pair(int i,int J):m(i),n(J){}
bool operator>(Pair P)const; //需在类体外给出定义
};
int main(){
Pair pl(3,4),p2(4,3),p3(4,5);
COUt<<(pl>p2)<<(p2>p1)<<(p2>p3)<<(p3>p2);
return 0;
{
运算符函数operator>功能是比较两个Pair对象的大小,当左边对象大时,返回true,否则返回false。比较规则是首先比较两对象的m成员,m大者为大;当m相等时比较n.n大者为大。程序输出0101,下列对运算符重载函数的正确定义是
A.bool Pair::operator>(Pair P)const {if(m!=P.m)return m>P.m;return n>P.n;)
B.bool Pair::operator>(Pair P) {if(m!=P.m)return m>P.m;return n>P.n;)
C.bool Pair::operator>(Pair P)const {if(m>P.m)return true;return 11>P.n;)
D.bool Pair::operator>(Pair P) {if(m>P.m)return true;return 11>P.n;}
第8题:
当需要将一个函数bool isnumber(char c)声明为内联函数时,则此内联函数的函数原型为( )。
A.enum bool isnumber(char c);
B.define bool isnumber(char c);
C.inline bool isnumber(char c);
D.extem bool isnumber(char c);
第9题:
在public HttpSession getSession(boolean bool)的方法定义中,当bool为false时表明()
第10题:
在J2EE中,对于在Servlet如何获得会话,描述正确的是()。