A.只适用于营利性工业企业
B.普遍适用于各类组织
C.只适用于非营利性组织
D.只适用于营利性组织
第1题
在下列程序的空白处,应填入的正确选项是()。
A.start()
B.close()
C.read()
D.write()
第2题
在下列程序的空白处,应填入的正确选项是()。 importjava.io.*; PublicclasswriteInt{ Publicstaticvoidmain(stringl)a){ Int[]myArray={10,20,30,40}; try{ DataOutputSystemdos=newDataOutputSystem (newFileOu中utSystem(“ints.dat”)); for (int i=0;I<MYARRAY.LENGTH:I++) dos.writeInt(myArray[i]; dos.______"; System.out.println (“Havewritten binary flleints.dat”); } Catch(IOExceptiOniOe) {System.out.println(“IOException”); } } }
A.start()
B.Close()
C.read()
D.write()
第3题
在下列程序的空白处,应填入的正确选项是()。 Importjava.io.*; PulilcclassObjectStreamTest{ Publilcstaticvoidmain(string args [])thowsIOException{ ObjectOutputStream os=new ObjectOutputStream (newFileOutputStream(“serial.bln”)); Java.util.Dated=newJava.util.Date(); Oos______(d); ObjectlnputStreamois= newObjectlnputStream(newFileOutputStream(“serial.bin”)); try{ iava.util.daterestoredDate= (Java.util.Date)ois.readObject(); System.out.println (“readobjectbackfromserial.binfile:” +restoredDate); } Catch(ClassNotFoundException cnf){ System.out.println(“classnotfound”); } }
A.WriterObject
B.Writer
C.BufferedWriter
D.writerObject
第5题
在下列程序的空白处,应填入的正确选项是()。 Importjava.io.*; PulilcclassObjectStreamTest{ Publilcstaticvoidmain(string args [])thowsIOException{ ObjectOutputStream os=new ObjectOutputStream (newFileOutputStream(“serial.bln”)); Java.util.Dated=newJava.util.Date(); Oos______(d); ObjectlnputStreamois= newObjectlnputStream(newFileOutputStream(“serial.bin”)); try{ iava.util.daterestoredDate= (Java.util.Date)ois.readObject(); System.out.println (“readobjectbackfromserial.binfile:” +restoredDate); } Catch(ClassNotFoundException cnf){ System.out.println(“classnotfound”); } }
A.WriterObject
B.Writer
C.BufferedWriter
D.writerObject
第6题
在下列程序的空白处,应填入的正确选项是()。 importjava.io.*; PublicclasswriteInt{ Publicstaticvoidmain(stringl)a){ Int[]myArray={10,20,30,40}; try{ DataOutputSystemdos=newDataOutputSystem (newFileOu中utSystem(“ints.dat”)); for (int i=0;I<MYARRAY.LENGTH:I++) dos.writeInt(myArray[i]; dos.______"; System.out.println (“Havewritten binary flleints.dat”); } Catch(IOExceptiOniOe) {System.out.println(“IOException”); } } }
A.start()
B.Close()
C.read()
D.write()
第7题
下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是()。 publicclassFindKeyWords{ publicstaticvoidmain(sring[]args){ stingtext= “Anarrayisadatastructurthatstoresacollectionof” +“valuesofthesametype.YOUaccesseachindividualvalue'’ +“throughanintegerindex.Forexample,ifaiSanarray” +“of inergers,thena[i]iSthe ith integer in thearray.”; In tarrayCount=0; Intidex=-1; Sting arrarStr=“array”; IndeX=text.indexof(arrayStr); While(index______0){ ++arrayCount; Index+=arrayStr.length(); IndeX=text.indexof(arrayStr,indeX); } SyStem.out.phntln (“thetextcontains”+arrayCount+“arrays”); } }
A.<
B.=
C.<=
D.>=
第8题
下列程序的功能是统计字符串中“array”的个数,在程序的空白处应填入的正确选项是()。 publicclassFindKeyWords{ publicstaticvoidmain(sring[]args){ stingtext= “Anarrayisadatastructurthatstoresacollectionof” +“valuesofthesametype.YOUaccesseachindividualvalue'’ +“throughanintegerindex.Forexample,ifaiSanarray” +“of inergers,thena[i]iSthe ith integer in thearray.”; In tarrayCount=0; Intidex=-1; Sting arrarStr=“array”; IndeX=text.indexof(arrayStr); While(index______0){ ++arrayCount; Index+=arrayStr.length(); IndeX=text.indexof(arrayStr,indeX); } SyStem.out.phntln (“thetextcontains”+arrayCount+“arrays”); } }
A.<
B.=
C.<=
D.>=
第9题
(20 )在下列程序的空白处,应填入的正确选项是
import java.io.*;
Public class writeInt{
Public static void main(string[ ] a) {
Int[ ] myArray = {10,20,30,40};
try{
DataOutputSystem dos= new DataOutputSystem
(new FileOutputSystem(“ ints.dat ” ) ) ;
for (int i=0 ; I<myArray.length ; i++ )
dos 。 writeInt (myArray[i] ) ;
dos.
System.out.println
(“ Have written binary file ints.dat ” );
}
Catch(IOException ioe)
{ System.out.println(“ IO Exception ” );
}
}
}
A)start()
B)close()
C)read()
D)write()
第10题
(34 )在下列程序的空白处,应填入的正确选项是
Import java.io.*;
Pulilc class ObjectStreamTest{
Publilc static void main(string args[]) throws IOException{
ObjectOutputStream s= new ObjectOutputStream
(new FileOutputStream(“ serial.bin ” ));
Java .util.Date d= new Java.util.Date();
Oos___________ (d);
ObjectInputStream is=
new ObjectInputStream(new FileOutputStream(“ serial.bin ” ));
try{
java.util.date restoredDate =
(Java.util.Date) ois.readObject();
System.out.println
(“ read object back from serial.bin file: ”
+ restoredDate);
}
Catch (ClassNotFoundException cnf) {
System.out.println (“ class not found ” );
}
}
A ) WriterObject
B ) Writer
C )BufferedWriter
D ) WriterObject
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!