下列定义Session变量的语句中,正确的是()。
第1题:
类Teacher:classTeacher{Stringname;floatsalary;Teacher(Stringname){this.name=name;}Teacher(Stringname,floatsalary){this.name=name;this.salary=salary;}}执行语句Teachert=newTeacher(Tom”,2000.0f);后,字段salary的值是哪一项?()
A.2000.0f
B.0.0f
C.null;
D.2000
第2题:
6.______ Jenny._______name is Tom.
A.I'm;My
B.Her;My
C.I'm;His
D.She's;Her
第3题:
如果要把一个用户名jack保存在session对象里,则下列语句正确的是()。
第4题:
请问下面程序段执行完毕,页面上显示的内容是什么()<%DimstrTempstrTemp="user_name"Session("strTemp")="张红"Session(strTemp)="王刚"Response.WriteSession("user_name")%>
第5题:
Given an HttpServletRequest request: 22.String id = request.getParameter("jsessionid"); 23.// insert code here 24.String name = (String) session.getAttribute("name"); Which three can be placed at line 23 to retrieve anexisting HttpSession object?()
第6题:
类Student的声明如下: package com.school class Student{ String name; int age; Student(String name,int age){ //code } void study(String subject){ / /code } } 正确调用方法study(String subject)的是哪项?()
第7题:
Given that session is a valid HttpSession object: Int max = session.getAttribute(“MyReallyLongName”); Which is true?()
第8题:
2000.0f
0.0f
null;
2000
第9题:
<set name=”items” inverse=”true” cascade=”none”>…</set>
<set name=”items” inverse=”false” cascade=”none”>…</set>
<set name=”items” inverse=”true” cascade=”all”>…</set>
<set name=”items” inverse=”false” cascade=”save-update”>…</set>
第10题:
HttpSession session = request.getSession();
HttpSession session = request.getSession(id);
HttpSession session = request.getSession(true);
HttpSession session = request.getSession(false);
HttpSession session = request.getSession(jsessionid);
第11题:
第12题:
Student stu = new Student(“Tom”,23); stu.study(“数学”);
Student.study(“数学”);
Student stu = new Student(“Tom”,23); stu.study();
Student stu = new Student(“Tom”,23); String result=stu.study(“数学”);
第13题:
假设现在已经利用session对象把变量a赋值为hello,那么下列语句中能显示出“hello”的是______。
A.<%=session("a")%>
B.<%=session"a"%>
C.<%=session(a)%>
D.<%=session: a%>
第14题:
已知wage.getItem().size()的值是1。要想使执行session.update(wage)时自动执行session.update(wage.getItems().get(0)),必须配置()
第15题:
Name the author of the following literary works. The History of Tom Jones, a Foundling
第16题:
类Teacher: class Teacher{ String name; float salary; Teacher(String name){ this.name = name; } Teacher(String name,float salary){ this.name = name; this.salary = salary; } } 执行语句Teacher t = new Teacher(“Tom”,2000.0f);后,字段salary的值是哪一项?()
第17题:
下列选项中,()是正确的电子信箱地址。
第18题:
Which HttpSession method stores an object in a session?()
第19题:
session.setAttribute( name, jack );
session.setAttribute(“ name” , “jack”);
session.setAttribute( “jack”, “ name” );
session.setAttribute(“jack”, name );
第20题:
The value returned needs to be cast to an int.
The getAttribute methos takes two arguments.
Primitive CANNOT be stored in the HttpSession.
The HttpSession attribute name must NOT exceed eight characters.
第21题:
put(String name. Object value)
set(String name. Object value)
setAttribute(String name. Object value)
putAttribute(String name. Object value)
addAttribute(String name. Object value)
第22题:
must
may
might
can’t
第23题:
Vrrp vrid 1 track bfd-session session-name 1 reduced 100
bfd-session Vrrp vrid 1 track session-name 1 reduced 100
track vrrp vrid 1 bfd-session session-name 1 reduced 100
Vrrp vrid 1 track bfd-session-name 1 reduced 100