ItemSimpleTag can find the enclosing instance of ShoppingListTag by calling getParent() and castingthe result to ShoppingListTag.
ShoppingListTag can find the child instances of ItemSimpleTag by calling super.getChildren() andcasting each to an ItemSimpleTag.
It is impossible for ItemSimpleTag and ShoppingListTag to find each other in a tag hierarchy becauseone is a Simple tag and the other is a Classic tag.
ShoppingListTag can find the child instances of ItemSimpleTag by calling getChildren() on thePageContext and casting each to an ItemSimpleTag.
ItemSimpleTag can find the enclosing instance of ShoppingListTag by calling findAncestorWithClass()on the PageContext and casting the result to ShoppingListTag.
第1题:
顶风顶流情况下航行,船舶对水航程SL,对地航程SG,船速VE,航时t,则()。
A.SG
B.SL>VEt,且SL>SG
C.SG>SL>VEt
D.SLSL
第2题:
importjava.util.*;
publicclassNameList{
privateListnames=newArrayList();
publicsynchronizedvoidadd(Stringname){names.add(name);}
publicsynchronizedvoidprintAll(){
for(inti=0;iSystem.out.print(names.get(i)+);
}
}
publicstaticvoidmain(String[]args){
finalNameListsl=newNameList();
for(inti=0;i<2;i++){
newThread(){
publicvoidruin(){
sl.add(”A”);
sl.add(”B”);
sl.add(”C”);
sl.printAll();
}
}.start();
}
}
}
Whichtwostatementsaretrueifthisclassiscompiledandrun?()
第3题:
有风无流时,如计程仪改正率ΔL=0%,则相对计程仪航程(SL)和实际航程(SG)之间的关系为()。
A.SL>SG
B.SL=SG
C.SL
D.视风的顺逆而定
第4题:
目前我国水利水电工程施工质量检验与评定规程采用的标准是( )。
A.SL380-2007
B.SL176-2007
C.SL381-2007
D.SL385-2007
第5题:
若有定义语句:
char}sl=‘’0K”,:It s2=”ok”;
以下选项中,能够输出“OK”的语句是( )。
A.if(strcmp(sl,s2)!=0)puts(s2);
B.if(strcmp(sl,s2)!=0)puts(s1);
C.if(strcmp(sl,s2)==1)puts(s1);
D.if(strcmp(sl,s2)==0)puts(s1);
第6题:
Thesl:shoppingListandsl:itemtagsoutputashoppinglisttotheresponseandareusedasfollows:11.<sl:shoppingList>12.<sl:itemname="Bread"/>13.<sl:itemname="Milk"/>14.<sl:itemname="Eggs"/>15.</sl:shoppingList>Thetaghandlerforsl:shoppingListisShoppingListTagandthetaghandlerforsl:itemisItemSimpleTag.ShoppingListTagextendsBodyTagSupportandItemSimpleTagextendsSimpleTagSupport.Whichistrue?()
A.ItemSimpleTagcanfindtheenclosinginstanceofShoppingListTagbycallinggetParent()andcastingtheresulttoShoppingListTag.
B.ShoppingListTagcanfindthechildinstancesofItemSimpleTagbycallingsuper.getChildren()andcastingeachtoanItemSimpleTag.
C.ItisimpossibleforItemSimpleTagandShoppingListTagtofindeachotherinataghierarchybecauseoneisaSimpletagandtheotherisaClassictag.
D.ShoppingListTagcanfindthechildinstancesofItemSimpleTagbycallinggetChildren()onthePageContextandcastingeachtoanItemSimpleTag.
E.ItemSimpleTagcanfindtheenclosinginstanceofShoppingListTagbycallingfindAncestorWithClass()onthePageContextandcastingtheresulttoShoppingListTag.
第7题:
下列程序段执行后,内存变量sl的值是( )。
s1="network"
sl=stuff(sl,4,4,"BIOS")
? s1
A.network
B.netBl0S
C.net
D.BIOS
第8题:
顺风顺流情况下航行,船舶对水航程SL,对地航程SG,船速VE,航时t,则()。
A.SG
B.SL>VEt,且SL>SG
C.SG>SL>VEt
D.SLSL
第9题:
下列程序段执行后,内存变量sl的值是( )。 s1="network" sl=stuff(sl,4,4,"BIOS") ? s1
A.network
B.netBl0S
C.net
D.BIOS
第10题:
If Mary()shopping this afternoon, please ask her to write a shopping list first.
Awill go
Bgoes
Cwent
Dhas gone