-
Given a web application in which the request parameter product ID contains a product identifier.Which two EL expressions evaluate the value of the product ID?()
A . ${product ID}
B . ${param.productID}
C . ${params.productID}
D . ${params.productID[1]}
E . ${paramvalues.productID}
F . ${paramValues.productID[0]}
G . ${pageContext.request.productID}
-
Given: 10. class One { 11. void foo() { } 12. } 13. class Two extends One { 14. //insert method here 15. } Which three methods, inserted individually at line 14, will correctly complete class Two?()
A . public void foo() { /* more code here */ }
B . private void foo() { /* more code here */ }
C . protected void foo() { /* more code here */ }
D . int foo() { /* more code here */ }
E . void foo() { /* more code here */ }
-
https://assets.asklib.com/images/image2/201807311108379566.jpgWhich retrieves the value associated with “foo” from within an HttpServlet?()
A . String value = getServletConfig( ).getParameter(“foo”);
B . String value = getServletContext( ).getAttribute(“foo”);
C . Object value = getServletContext( ).getInitParameter(“foo”);
D . String value = getServletContext( ).getInitParameter(“foo”)
-
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?()
A . ${func(1)}
B . ${foo:func(4)}
C . ${func:foo(2)}
D . ${foo(5):func}
E . ${func:foo(“easy”)}
F . ${func:foo(“3”).name}
-
Given: 1.<% int[] nums = {42,420,4200}; 2.request.setAttribute("foo", nums); %> 3.${5 + 3 lt 6} 4.${requestScope[’foo’][0] ne 10 div 0} 5. ${10 div 0} What is the result?()
A . True true
B . False true
C . False true 0
D . True true Infinity
E . False true Infinity
-
Given the fully-qualified class names: com.foo.bar.Dog com.foo.bar.blatz.Book com.bar.Car com.bar.blatz.Sun Which graph represents the correct directory structure for a JAR file from which those classes can be used by the compiler and JYM?()
A . Jar A
B . Jar B
C . Jar C
D . Jar D
E . Jar E
-
Given: 6.<% int[] nums = {42, 420, 4200}; 7.request.setAttribute("foo", nums); %> Which two successfully translate and result in a value of true?()
A . ${true or false}
B . ${requestScope[foo][0] > 500}
C . ${requestScope[’foo’][1] = 420}
D . ${(requestScope[’foo’][0] lt 50) && (3 gt 2)}
-
Which two are functions of an IP voice gateway?()
A . provide far-end call control
B . provide far-end camera control
C . translate analog voice to packetized voice
D . transition call path between different networks
E . provide locations-based call admission control&e
-
Given: 6.<myTag:foo bar=’42’> 7.<%="processing" %> 8.</myTag:foo> and a custom tag handler for foo which extends TagSupport. Which two are true about thetag handler referenced by foo?()
A . The doStartTag method is called once.
B . The doAfterBody method is NOT called.
C . The EVAL_PAGE constant is a valid return value for the doEndTag method.
D . The SKIP_PAGE constant is a valid return value for the doStartTag method.
E . The EVAL_BODY_BUFFERED constant is a valid return value for the doStartTag method.
-
Given: 8.int index = 1: 9.Boolean [] test = new boolcan [3]; 10.boolcan foo = test [index]; What is the result()?
A . foo has the value of 0.
B . foo has the value of null.
C . foo has the value of true.
D . foo has the value of false.
E . An-exception is thrown.
F . The code will not compile.
-
What is the function of an engine’s stationary parts?()
A . To add power to the engine
B . To keep the engine firmly attached to its supporting base
C . To keep moving engine part in their proper relative positions
D . To rotate the crankshaft
-
A developer wants too use EL to invoke a function using S{my:bloof(“foof”)}. Which is always true?()
A . The method invoked by this function must be statie.
B . The function class must implement the Function interface.
C . The expression is NOT a valid EL expression for invoking a function.
D . The function must be declared in a web.xml file using the
-
The primary function of an electric motor is to ()
A . develop torque
B . generate high voltages
C . produce a magnetic field
D . generate high electrical resistance
-
Given: 1. public interface Foo { 2. int k = 4: 3. } Which three are equivalent to line 2?()
A . final int k = 4:
B . public int k = 4:
C . static int k = 4:
D . private int k = 4:
E . abstract int k = 4:
F . volatile int k = 4:
G . transient int k = 4:
H . protected int k = 4:
-
Given 1. public class Foo { 2. public static void main (String [] args) } 3. try { return;} 4. finally { Syste.out.printIn (“Finally”);} 5. } 6. } What is the result()?
A . The program runs and prints nothing.
B . The program runs and prints “Finally”.
C . The code comiles. But an exception is thrown at runtime.
D . The code will not compile because the catch block is missing.
-
Given the HttpServlet code: getServletContext().setAttribute(“foo”, “value”); What is the result?()
A . The attribute foo is placed in the application
B . A ServletContextListener registered for that servlet is notified
C . A ServletAttributeListener registered for that servlet is notified
D . An HttpSessionAttributeListener registered for that servlet is notified
-
Given an EL function declared with:11. <function> 12.<name>spin</name> 13.<function-class>com.example.Spinner</function-class> 14.<function-signature> 15.java.lang.String spinIt() 16.</function-signature> 17.</function> Which two are true?()
A . The function method must have the signature: public String spin().
B . The method must be mapped to the logical name "spin" in the web.xml file.
C . The function method must have the signature: public String spinIt().
D . The function method must have the signature public static String spin().
E . The function method must have the signature: public static String spinIt().
F . The function class must be named Spinner, and must be in the package com.example.
-
Given: 310-025 Leading the way in IT testing and certification tools, www.testking.com - 48 - public class foo { static String s; public static void main (Stringargs) { system.out.printIn (“s=” + s); } } What is the result?()
A . The code compiles and “s=” is printed.
B . The code compiles and “s=null” is printed.
C . The code does not compile because string s is not initialized.
D . The code does not compile because string s cannot be referenced.
E . The code compiles, but a NullPointerException is thrown when toString is called.
-
To pass an array to a function, specify
-
Given:1.<%int[]nums={42,420,4200};2.request.setAttribute("foo",nums);%>3.${5+3lt6}4.${requestScope[’foo’][0]ne10div0}5.${10div0}Whatistheresult?()
A.Truetrue
B.Falsetrue
C.Falsetrue0
D.TruetrueInfinity
E.FalsetrueInfinity
-
Given:6.<myTag:foobar=’42’>7.<%="processing"%>8.</myTag:foo>andacustomtaghandlerforfoowhichextendsTagSupport.Whichtwoaretrueaboutthetaghandlerreferencedbyfoo?()
A.ThedoStartTagmethodiscalledonce.
B.ThedoAfterBodymethodisNOTcalled.
C.TheEVAL_PAGEconstantisavalidreturnvalueforthedoEndTagmethod.
D.TheSKIP_PAGEconstantisavalidreturnvalueforthedoStartTagmethod.
E.TheEVAL_BODY_BUFFEREDconstantisavalidreturnvalueforthedoStartTagmethod.
-
If an individual’s utility function is given by U(x,y)=xy, px = 2, py = 4, and income I = 200, please calculate his or her preferred consumption bundle()
A.(x,y)=(50, 100)
B.(x,y)=(100,50)
C.(x,y)=(50,25)
D.(x,y)=(25,50)
-
以下代码的运行结果是function foo(){console.log(bar) // 结果let bar = 1;}foo
A.undefined
B.1
C.null
D.ReferenceError: bar is not defined
此题为多项选择题。
-
以下代码中的输出结果是const promise1 = new Promise(function (resolve, reject) {setTimeout(function(){resolve('foo');}, 300);});promise1.then(function(){return 'bar';}).then(function (value) {console.log('hi,' + value); // 输出结果})
A."hi,bar
B."hi,foo
C."hi,undefined
D."hi
此题为多项选择题。