A web application contains a tag file called beta.tag in /WEB-INF/tags/alpha. A JSP page called sort.jspexists in the web application and contains only this JSP code: 1.%@ taglib prefix="x" 2.tagdir="/WEB-INF/tags/alpha" % 3. The sort.jsp page is requested. Which two are true?()A、Tag files can only be accessed using a tagdir attribute.B、The sort.jsp page translates successfully and invokes the tag defined by beta.tag.C、The sort.jsp page produces a translation error because a taglib directive must always have a uriattribute.D、Tag files can only be placed in /WEB-INF/tags, and NOT in any subdirectories of /WEB- INF/tags.E、The tagdir attribute in line 2 can be replaced by a uri attribute if a TLD referring to beta.tag is createdand added to the web application.
- A、Tag files can only be accessed using a tagdir attribute.
- B、The sort.jsp page translates successfully and invokes the tag defined by beta.tag.
- C、The sort.jsp page produces a translation error because a taglib directive must always have a uriattribute.
- D、Tag files can only be placed in /WEB-INF/tags, and NOT in any subdirectories of /WEB- INF/tags.
- E、The tagdir attribute in line 2 can be replaced by a uri attribute if a TLD referring to beta.tag is createdand added to the web application.
相关考题:
14 Alpha buys goods from Beta. At 30 June 2005 Beta’s account in Alpha’s records showed $5,700 owing to Beta.Beta submitted a statement to Alpha as at the same date showing a balance due of $5,200.Which of the following could account fully for the difference?A Alpha has sent a cheque to Beta for $500 which has not yet been received by Beta.B The credit side of Beta’s account in Alpha’s records has been undercast by $500.C An invoice for $250 from Beta has been treated in Alpha’s records as if it had been a credit note.D Beta has issued a credit note for $500 to Alpha which Alpha has not yet received.
Awebapplicationcontainsatagfilecalledbeta.tagin/WEB-INF/tags/alpha.AJSPpagecalledsort.jspexistsinthewebapplicationandcontainsonlythisJSPcode:1.%@taglibprefix=x2.tagdir=/WEB-INF/tags/alpha%3.x:beta/Thesort.jsppageisrequested.Whichtwoaretrue?()A.Tagfilescanonlybeaccessedusingatagdirattribute.B.Thesort.jsppagetranslatessuccessfullyandinvokesthetagdefinedbybeta.tag.C.Thesort.jsppageproducesatranslationerrorbecauseataglibdirectivemustalwayshaveauriattribute.D.Tagfilescanonlybeplacedin/WEB-INF/tags,andNOTinanysubdirectoriesof/WEB-INF/tags.E.Thetagdirattributeinline2canbereplacedbyauriattributeifaTLDreferringtobeta.tagiscreatedandaddedtothewebapplication.
现有包结构:com|--x||--Alpha.class||||--y||--Beta.class||--Gamma.class和类://insertcodehereimportcom.*;importcom.x.y.*;classTest{Alphaa;Betab;Gammac;}哪两行分别插入后可允许代码编译?() A.packagecom.;B.importcom.x;C.packagecom.x;D.importcom.x.Alpha;
10.interfaceFoo{}11.classAlphaimplementsFoo{}12.classBetaextendsAlpha{}13.classDeltaextendsBeta{14.publicstaticvoidmain(String[]args){15.Betax=newBeta();16.//insertcodehere17.}18.}Whichcode,insertedatline16,willcauseajava.lang.ClassCastException?()A.Alphaa=x;B.Foof=(Delta)x;C.Foof=(Alpha)x;D.Betab=(Beta)(Alpha)x;
Given:Which code, inserted at line 16, will cause a java.lang.ClassCastException?() A.Alpha a = x;B.Foo f = (Delta)x;C.Foo f = (Alpha)x;D.Beta b = (Beta)(Alpha)x;
设有一共用体变量定义如下: union data { long w; float x; int y; char z;}; union data beta; 执行下列语句后,正确的共用体变量beta的值是( )。 beta.w=123456; beta.y=888; beta.x=3.1416; beta.z='x';A.123456B.888C.3.1416D.'X'
现有如F包结构: com |一一X | |一一Alpha.class | | | |一一y I |一一Beta.class | |l-- Gamma.class 和类: class Test { Alpha a; Beta b; Gamma c; } 哪三个必须加入到类Test中,以使其通过编译?() A、 package y;B、 package com;C、 import com.x.y.*;D、 import com.x.*;
已知符号定义语句如下: ALPHA EQU 100 BETA EQU 25 GAMMA EQU 2 分别求下列各表达式的值。 (1)ALPHA*4GTBETA (2)ALPHAMODGAMMA+BETA (3)(BETA/3)LE5 (4)ALPHAANDBETA (5)GAMMAXOR(BETAEQ25)
class Beta { public static void main(String [] args) { Integer x = new Integer(6) * 7; if (x != 42) { System.out.print("42 "); } else if (x 〈 new Integer(44-1)) { System.out.println("less"); } else { System.out.print("done"); } } } 结果是什么?() A、lessB、42C、doneD、编译失败
现有包结构: com |-- x | |-- Alpha.class | | | |-- y | |-- Beta.class | |-- Gamma.class 和类: //insert code here import com.*; import com.x.y.*; class Test { Alpha a; Beta b; Gamma c; } 哪两行分别插入后可允许代码编译?() A、package com.;B、import com.x;C、package com.x;D、import com.x.Alpha;
现有如下包结构: com |-- x | |-- Alpha.class | | | |-- y | |-- Beta.class | |-- Gamma.class 和类: class Test { Alpha a; Beta b; Gamma c; } 哪三个必须加入到类 Test 中,以使其通过编译?()A、package y;B、package com;C、import com.x.*;D、import com.x.y.*
A resource group, MY_APP, has the following configuration: Resource Group NameMY_APP Participating Node Name(s)Alpha Beta GammaStartup Policy Online On Home Node Only Fallover Policy Fallover To Next Priority Node In The List Fallback Policy Fallback To Higher Priority Node InThe List MY_APP is currently running on node Beta. MY_APP is then moved to node Gamma using C-SPOC.Nodes Alpha and Beta are shutdown and restarted. Node Alpha stabilizes approx 60 seconds before nodeBeta. What happens to the resource group, MY_APP, when nodes Alpha and Beta are restarted?()A、It moves to BetaB、It stays on GammaC、It moves to AlphaD、It moves to Alpha, then to Beta
class Beta { public static void main(String [] args) { Integer x = new Integer(6) * 7; if (x != 42) { System.out.print("42 "); } else if (x.equals(42)) { System.out.print("dot = "); } else { System.out.print("done"); } } } 结果为:() A、42B、doneC、dot =D、编译失败
10. interface Foo {} 11. class Alpha implements Foo {} 12. class Beta extends Alpha {} 13. class Delta extends Beta { 14. public static void main( String[] args) { 15. Beta x = new Beta(); 16. // insert code here 17. } 18. } Which code, inserted at line 16, will cause a java.lang.ClassCastException?() A、 Alpha a = x;B、 Foo f= (Delta)x;C、 Foo f= (Alpha)x;D、 Beta b = (Beta)(Alpha)x;
interface Beta {} class Alpha implements Beta { String testIt() { return “Tested”; } } public class Main1 { static Beta getIt() { return new Alpha(); } public static void main( String[] args ) { Beta b = getIt(); System.out.println( b.testIt() ); } } What is the result?() A、 TestedB、 Compilation fails.C、 The code runs with no output.D、 An exception is thrown at runtime.
多选题A web application contains a tag file called beta.tag in /WEB-INF/tags/alpha. A JSP page called sort.jspexists in the web application and contains only this JSP code: 1. 3. The sort.jsp page is requested. Which two are true?()ATag files can only be accessed using a tagdir attribute.BThe sort.jsp page translates successfully and invokes the tag defined by beta.tag.CThe sort.jsp page produces a translation error because a taglib directive must always have a uriattribute.DTag files can only be placed in /WEB-INF/tags, and NOT in any subdirectories of /WEB- INF/tags.EThe tagdir attribute in line 2 can be replaced by a uri attribute if a TLD referring to beta.tag is createdand added to the web application.
单选题10. interface Foo {} 11. class Alpha implements Foo {} 12. class Beta extends Alpha {} 13. class Delta extends Beta { 14. public static void main( String[] args) { 15. Beta x = new Beta(); 16. // insert code here 17. } 18. } Which code, inserted at line 16, will cause a java.lang.ClassCastException?()A Alpha a = x;B Foo f= (Delta)x;C Foo f= (Alpha)x;D Beta b = (Beta)(Alpha)x;
单选题interface Beta {} class Alpha implements Beta { String testIt() { return “Tested”; } } public class Main1 { static Beta getIt() { return new Alpha(); } public static void main( String[] args ) { Beta b = getIt(); System.out.println( b.testIt() ); } } What is the result?()A TestedB Compilation fails.C The code runs with no output.D An exception is thrown at runtime.
多选题10. class Foo { 11. static void alpha() { /* more code here */ } 12. void beta() { /* more code here */ } 13. } Which two are true?()AFoo.beta() is a valid invocation of beta().BFoo.alpha() is a valid invocation of alpha().CMethod beta() can directly call method alpha().DMethod alpha() can directly call method beta().
单选题class Beta { public static void main(String [] args) { Integer x = new Integer(6) * 7; if (x != 42) { System.out.print("42 "); } else if (x.equals(42)) { System.out.print("dot = "); } else { System.out.print("done"); } } } 结果为:()A42BdoneCdot =D编译失败
单选题Which code, inserted at line 16, will cause a java.lang.ClassCastException?()A Alpha a=x;B Foo f=(Delta)x;C Foo f=(Alpha)x;D Beta b=(Beta)(Alpha)x;
单选题Given: Which code, inserted at line 16, will cause a java.lang.ClassCastException?()A Alpha a = x;B Foo f = (Delta)x;C Foo f = (Alpha)x;D Beta b = (Beta)(Alpha)x;