Given an EL function foo, in namespace func, that requires a

题目
多选题
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}

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

有如下程序include using namespace std;class A{public:virtual void func1 (){ cou

有如下程序#include <iostream>using namespace std;class A{public:virtual void func1 (){ cout<<"A1"; }void func2(){ cout<<"A2"; }};class B: public A{public:void func l(){ cout<<"B1"; }void func2(){ cout<<"B2"; }};int main() {A *p=new B;p->func1();p->func2();return 0;}运行此程序,屏幕上将显示输出( )。

A.B1B2

B.A1A2

C.B1A2

D.A1B2


正确答案:C

第2题:

GivenanELfunctionfoo,innamespacefunc,thatrequiresalongasaparameterandreturnsaMap,which twoarevalidinvocationsoffunctionfoo?()

A.${func(1)}

B.${foo:func(4)}

C.${func:foo(2)}

D.${foo(5):func}

E.${func:foo("easy")}

F.${func:foo("3").name}


参考答案:C, F

第3题:

阅读下列程序: Function func(n As Integer)As Integer Sum = 0 For i = 1 To n Sum = Sum + (i + 1)* i Next i func = Sum End Function.Private Sub Command1_Click () Dim a As Integer a= 5 s = func (A)Print s End Sub 程序运行后,单击命令按钮,输出的结果为

A.80

B.60

C.70

D.15


正确答案:C
解析:本题调用一个Function过程func,该过程只有一个参数,类型为整型,返回值也为整型。过程的调用十分简单,关键是要搞清楚过程func的功能。从For-Next循环可以看出,该过程的功能是:1×2+2×3+3×4+…+(n+1)×n。在调用过程时,实参a的值为5,即上式中的n=5。因此返回的值为:1×2+2×3+3×4+4×5+5×6=70。

第4题:

下面程序执行后的结果是()。includeusing namespace std;void func1(int i);void func

下面程序执行后的结果是( )。 #include<iostream> using namespace std; void func1(int i); void func2(int i); char st[]="hello, friend!"; void func1(int i) { cout<<st[i]; if(i<3){i+=2;func2(i);} } void func2(int i) { cout<<st[i]; if(i<3){i+=2;func1(i);} } void main() { int i=0;func1(i);cout<<endl;}

A.ello

B.hel

C.hlo

D.him


正确答案:C
解析:主函数中调用func1()函数,实参赋值为0,在该函数中先输出st[0],即“h,,;然后func1()函数又调用func2()函数,实参赋值为2,func2()函数运行时先输出st[2],即“1”;然后又调用func1()函数,实参赋值为4,func1()函数运行时先输出st[4],即“o”。

第5题:

Given:Which code, inserted at line 15, allows the class Sprite to compile?()

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; }


参考答案:C

第6题:

ClicktheExhibitbutton.Given:11.<%com.example.Advisoradvisor=newcom.example.Advisor();%>12.<%request.setAttribute("foo",advisor);%>Assumingtherearenoother"foo"attributesinthewebapplication,whichthreearevalidELexpressionsforretrievingtheadvicepropertyofadvisor?()

A.${foo.advice}

B.${request.foo.advice}

C.${requestScope.foo.advice}

D.${requestScope[foo[advice]]}

E.${requestScope["foo"]["advice"]}


参考答案:A, C, E

第7题:

Given:Which three methods, inserted individually at line 14, will correctly complete class Two?()

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 */ }


参考答案:B, C, E

第8题:

GivenanELfunctionfoo,innamespacefunc,thatrequiresalongasaparameterandreturnsaMap,whichtwoarevalidinvocationsoffunctionfoo?()

A.${func(1)}

B.${foo:func(4)}

C.${func:foo(2)}

D.${foo(5):func}

E.${func:foo(“easy”)}

F.${func:foo(“3”).name}


参考答案:F

第9题:

Given:fooandbararepublicreferencesavailabletomanyotherthreads.fooreferstoaThreadandbarisanObject.Thethreadfooiscurrentlyexecutingbar.wait().Fromanotherthread,whatprovidesthemostreliablewaytoensurethatfoowillstopexecutingwait()?

A.foo.notify();

B.bar.notify();

C.foo.notifyAll();

D.Thread.notify();

E.bar.notifyAll();


参考答案:E

第10题:

以下程序的输出结果是()。includeincludeusing namespace std;void func(cha

以下程序的输出结果是( )。 #include<iostream> #include<stdlib> using namespace std; void func(char **m) { ++m; cout<<*m<<endl; } main() { static char *a[]={"MORNING","AFTERNOON","EVENING"); char **n; n=a; func(n); system("PAUSE"); return 0; }

A.为空

B.MORNING

C.AFTERNOON

D.EVENING


正确答案:C

更多相关问题