Given: foo and bar are public references available to many other threads, foo refers to a Thread and bar is an Object. The thread foo is currently executing bar.wait(). From another thread, what provides the most reliable way to ensure that foo will stop executing wait()?()
第1题:
A.int foo() { /* more code here */ }
B.void foo() { /* more code here */ }
C.public void foo() { /* more code here */ }
D.private void foo() { /* more code here */ }
E.protected void foo() { /* more code here */ }
第2题:
A.Foo { public int bar() { return 1; }
B.new Foo { public int bar() { return 1; }
C.new Foo() { public int bar() { return 1; }
D.new class Foo { public int bar() { return 1; }
第3题:
A.list.add("foo");
B.Objecto=list;
C.Strings=list.get(0);
D.list=newArrayList
第4题:
Given: 6.<% int[] nums = {42, 420, 4200}; 7.request.setAttribute("foo", nums); %> Which two successfully translate and result in a value of true?()
第5题:
Given: 8.int index = 1: 9.Boolean [] test = new boolcan [3]; 10.boolcan foo = test [index]; What is the result()?
第6题:
Given the HttpServlet code: getServletContext().setAttribute(“foo”, “value”); What is the result?()
第7题:
public void foo() { /* more code here */ }
private void foo() { /* more code here */ }
protected void foo() { /* more code here */ }
int foo() { /* more code here */ }
void foo() { /* more code here */ }
第8题:
The foo initialization parameter CANNOT be set programmatically.
Compilation fails because getInitParameter returns type Object.
The foo initialization parameter is NOT a servlet initialization parameter.
Compilation fails because ServletContext does NOT have a getInitParameter method.
The foo parameter must be defined within the
第9题:
foo has the value of 0.
foo has the value of null.
foo has the value of true.
foo has the value of false.
An-exception is thrown.
The code will not compile.
第10题:
${func(1)}
${foo:func(4)}
${func:foo(2)}
${foo(5):func}
${func:foo(“easy”)}
${func:foo(“3”).name}
第11题:
The attribute foo is placed in the application
A ServletContextListener registered for that servlet is notified
A ServletAttributeListener registered for that servlet is notified
An HttpSessionAttributeListener registered for that servlet is notified
第12题:
Alpha a = x;
Foo f = (Delta)x;
Foo f = (Alpha)x;
Beta b = (Beta)(Alpha)x;
第13题:
A.Alpha a = x;
B.Foo f = (Delta)x;
C.Foo f = (Alpha)x;
D.Beta b = (Beta)(Alpha)x;
第14题:
Given:fooandbararepublicreferencesavailabletomanyotherthreads.fooreferstoaThreadandbarisanObject.Thethreadfooiscurrentlyexecutingbar.wait().Fromanotherthread,whatprovidesthemostreliablewaytoensurethatfoowillstopexecutingwait()?
A.foo.notify();
B.bar.notify();
C.foo.notifyAll();
D.Thread.notify();
E.bar.notifyAll();
第15题:
Given: 3.public class MyTagHandler extends TagSupport { 4.public int doStartTag() { 5.// insert code here 6.// return an int 7.} 8.// more code here ... 18.} There is a single attribute foo in the session scope. Which three code fragments,inserted independently atline 5,return the value of the attribute?()
第16题:
Given an EL function foo, in namespace func, that requires a long as a parameter and returns a Map,which two are valid invocations of function foo?()
第17题:
Given the JSP code: <% request.setAttribute("foo", "bar"); %>and the Classic tag handler code: 5. public int doStartTag() throws JspException { 6. // insert code here 7. // return int 8. } Assume there are no other "foo" attributes in the web application. Which invocation on the pageContextobject,inserted at line 6,assigns "bar" to the variable x?()
第18题:
Given: foo and bar are public references available to many other threads. foo refers to a Thread and bar is anObject. The thread foo is currently executing bar.wait(). From another thread,what provides the most reliable wayto ensure that foo will stop executing wait()?
第19题:
int foo() { /* more code here */ }
void foo() { /* more code here */ }
public void foo() { /* more code here */ }
private void foo() { /* more code here */ }
protected void foo() { /* more code here */ }
第20题:
${true or false}
${requestScope[foo][0] > 500}
${requestScope[’foo’][1] = 420}
${(requestScope[’foo’][0] lt 50) && (3 gt 2)}
第21题:
foo.notify();
bar.notify();
foo.notifyAll();
Thread.notify();
bar.notifyAll();
Object.notify();
第22题:
The foo initialization parameter CANNOT be set programmatically.
Compilation fails because getInitParameter returns type Object.
The foo initialization parameter is NOT a servlet initialization parameter.
Compilation fails because ServletContext does NOT have a getInitParameter method.
The foo parameter must be defined within the
第23题:
foo.notify();
bar.notify();
foo.notifyAll();
Thread.notify();
bar.notifyAll();