A system at 192.100.45.17 is able to print to the printer. However, another system at 192.100.50.23 cannot print to the same printer. All of the following should be performed EXCEPT:()
第1题:
The(74)has several major components, including the system kernel, a memory management system, the file system manager, device drivers, and the system libraries.
A.application
B.information system
C.network
D.operating system
第2题:
11.classA{12.publicvoidprocess(){System.out.print(”A);}}13.classBextendsA{14.publicvoidprocess()throwsRuntimeException{15.super.process();16.if(true)thrownewRuntimeException();17.System.out.print(B”);}}18.publicstaticvoidmain(String[]args){19.try{((A)newB()).process();}20.catch(Exceptione){System.out.print(”Exception);}21.}Whatistheresult?()
A.Exception
B.AException
C.AExceptionB
D.ABException
E.Compilationfailsbecauseofanerrorinline14.
F.Compilationfailsbecauseofanerrorinline19.
第3题:
John H Hall played a significant role in developing the “American system of production” in early 19th century-using interchangeable parts for mass manufacturing, which lowered costs and improved efficiency.()
此题为判断题(对,错)。
第4题:
Given:11.staticclassA{12.voidprocess()throwsException{thrownewException();}13.}14.staticclassBextendsA{15.voidprocess(){System.out.println("B");}16.}17.publicstaticvoidmain(String[]args){18.Aa=newB();19.a.process();20.}Whatistheresult?()
A.Compilationfailsbecauseofanerrorinline19.
B.Anexceptionisthrownatruntime.
C.B
D.Compilationfailsbecauseofanerrorinline18.
E.Compilationfailsbecauseofanerrorinline15.
F.Thecoderunswithnooutput.
第5题:
11.publicvoidtestIfA(){12.if(testIfB(”True”)){13.System.out.println(”True”);14.}else{15.System.out.println(”Nottrue”);16.}17.}18.publicBooleantestIfB(Stringstr){19.returnBoolean.valueOf(str);20.}WhatistheresultwhenmethodtestIfAisinvoked?()
A.True
B.Nottrue
C.Anexceptionisthrownatruntime.
D.Compilationfailsbecauseofanerroratline12.
E.Compilationfailsbecauseofanerroratline19.
第6题:
11.publicvoidgenNumbers(){12.ArrayListnumbers=newArrayList();13.for(inti=0;i<10;i++){14.intvalue=i*((int)Math.random());15.IntegerintObj=newInteger(value);16.numbers.add(intObj);17.}18.System.out.println(numbers);19.}WhichlineofcodemarkstheearliestpointthatanobjectreferencedbyintObjbecomesacandidateforgarbagecollection?()
A.Line16
B.Line17
C.Line18
D.Line19
E.TheobjectisNOTacandidateforgarbagecollection.
第7题:
11.classa{12.publicvoidprocess(){System.out.print(”a,”);}}13.classbextendsa{14.publicvoidprocess()throwsIOException{15.super.process();16.System.out.print(”b,”);17.thrownewIOException();18.}}19.publicstaticvoidmain(String[]args){20.try{newb().process();}21.catch(IOExceptione){System.out.println(”Exception”);}}Whatistheresult?()
A.Exception
B.a,b,Exception
C.Compilationfailsbecauseofanerrorinline20.
D.Compilationfailsbecauseofanerrorinline14.
E.ANullPointerExceptionisthrownatruntime.
第8题:
( 19 )阅读下列代码
public class Test2005{
public static void main(String args[]){
String s= ″ Test ″ ;
Switch(s){
case ″ Java ″ : System.out.print( ″ Java ″ ) ;
break ;
case ″ Language ″ : System.out.print( ″ Language ″ ) ;
break ;
case ″ Test ″ : System.out.print( ″ Test ″ ) ;
break ;
}
}
}
其运行结果是
A ) Java
B ) Language
C ) Test
D )编译出错
第9题:
下列程序中,给出两个整数2和3,分别求2除以3和2乘以3的结果,要求调用类ex19_1的方法method()来输出相应的结果,请将程序补充完整。程序运行结果如下。
0.6666666666666666
6
源程序文件代码清单如下:
public class exl9 1
{
public static void main(String args[])
{
int n1=2,n2=3;
ex19_1 obj19_1=new ex19_1();
obj19_1.
}
public void method(int x,int y)
{
System.out.println(______);
System.out.println(______);
}
}
第10题:
Given:11.publicvoidgenNumbers(){12.ArrayListnumbers=newArrayList();13.for(inti=0;i<10;i++){14.intvalue=i*((int)Math.random());15.IntegerintObj=newInteger(value);16.numbers.add(intObj);17.}18.System.out.println(numbers);19.}WhichlineofcodemarkstheearliestpointthatanobjectreferencedbyintObjbecomesacandidateforgarbagecollection?()
A.Line19
B.TheobjectisNOTacandidateforgarbagecollection.
C.Line17
D.Line16
E.Line18