网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
Whichstatementsaretrue,giventhecodenewFileOutputStream("data",true)forcreatinganobjectofclassFileOutputStream?()

A.FileOutputStreamhasnoconstructorsmatchingthegivenarguments.

B.AnIOExeceptionwillbethrownifafilenamed"data"alreadyexists.

C.AnIOExeceptionwillbethrownifafilenamed"data"doesnotalreadyexist.

D.Ifafilenamed"data"exists,itscontentswillberesetandoverwritten.

E.Ifafilenamed"data"exists,outputwillbeappendedtoitscurrentcontents.


参考答案

更多 “ Whichstatementsaretrue,giventhecodenewFileOutputStream("data",true)forcreatinganobjectofclassFileOutputStream?() A.FileOutputStreamhasnoconstructorsmatchingthegivenarguments.B.AnIOExeceptionwillbethrownifafilenameddataalreadyexists.C.AnIOExeceptionwillbethrownifafilenameddatadoesnotalreadyexist.D.Ifafilenameddataexists,itscontentswillberesetandoverwritten.E.Ifafilenameddataexists,outputwillbeappendedtoitscurrentcontents. ” 相关考题
考题 下面程序实现十进制向其他进制的转换。[Java程序]C1ass Node{int data;Node next;}class Transform{private Node top;publiC void print(){Node P;while(top !=null){P=top;if(P.data>9)System.out.print((char)(p.data+55));elseSystem.out.print(p.data);top=P.next;}}public void Trans(int d,int i)(//d为数字;i为进制int m;(1) n=false;Node P;while(d>0){(2) ;d=d/i;P=flew Node();if( (3) ){P.data=m;(4) ;top=P;n=true;}else{p.data=m;(5) ;toP=P;}}}}

考题 本题程序中实现了一个“生产者一消费者问题”。生产者产生一个随机数存入DataPool类中,消费者从中取出数据。DataPool类一次只能存放一个数据。请更正题中带下划线的部分。注意:不改变程序的结构,不得增行或删行。class DataPool{private int data;private boolean isFull;public DataPool(){isFull=false;}public synchronized void putData(int d){if(isFull= =true){try{this.notify();}catch(InterruptedException e){}}data=d;isFull=true;System.out.println("生产了一个数据:"+data);this.notify();}public synchronized int getData(){if(isFull= =false){try{this.wait();}catch(InterruptedException e){}}isFull=false;System.out.println("消费了一个数据"+data);this.wait();return this.data;}boolean getIsFull(){return isFull;}}class Producer extends Thread{DataPool pool;public Producer(DataPool pool){this.pool=pool;}public void run(){for(int i=0; i<10; i++){int data=(int) (Math.random()*1000);try{//用于生产数据sleep(data);}catch(InterruptedException e){}pool.putData(data);}}}class Consumer implements Runnable{DataPool pool;public Consumer(DataPool pool){this.pool=pool;}public void run(){for(int i=0; i<10; i++){int data=pool.getData();try{//用于处理数据sleep((int) (Math.random()*1000));}catch(InterruptedException e){}}}}public class advance}public static void main(String[] args){Data Pool pool=new Data Pool();Producer pro=new Producer(pool);Runnable con=new Consumer(pool);Thread conTh=new Thread(con);&n

考题 Usetheoperators">",whichstatementsaretrue?() A.000001000000000000000000000000005gives10000000000000000000000000000000B.000001000000000000000000000000005gives11111100000000000000000000000000C.110000000000000000000000000000005gives11111110000000000000000000000000D.110000000000000000000000000000005gives00000110000000000000000000000000

考题 阅读以下说明和Java程序,将应填入(n)处的字句写在对应栏内。[说明]下面程序实现十进制向其它进制的转换。[Java程序]ClasS Node{int data;Node next;}class Transform{private Node top;public void print(){Node p;while(top!=null){P=top;if(P.data>9)System.out.print((char)(P.data+55));elseSystem.out.print(p.data);top=p.next;}}public void Trans(int d,int i){//d为数字;i为进制int m;(1) n=false;Node p;while(d>0){(2);d=d/i;p=new Node();if( (3) ){p.data=m;(4);top=P;n=true;}else{p.data=m;(5);top=P;}}}}

考题 用“newFileOutputStream(“data.txt”,true)”创建一个FileOutputStream实例对象,则下面( )说法是正确的。A、如果文件“data.txt”存在,则将抛出IOException异常B、如果文件“data.txt”存在,则将在文件的末尾开始添加新内容C、如果文件“data.txt”存在,则将覆盖掉文件中已有的内容D、如果文件“data.txt”不存在,则将抛出IOException异常

考题 在有13个元素构成的有序表data[1..13]中,用折半查找(即二分查找,计算时向下取整)方式查找值等于data[8]的元素时,先后与(41)等元素进行了比较。A.data[7]. data[6]. data[8]B.data[7]. Data[8]C.data[7]. data[10]. data[8]D.data[7]. data[10]、data[9]. data[8]

考题 WhenIPTelephonyisdeployedforTeleworkersusingtheCiscoBusinessReadyTeleworkersolution,whichstatementsaretrue?() A.ThereislowerbandwidthconsumptionforVoIPmediastreams.B.Teleworkerscanhavethesameextensionsandinward-dialingnumbersattheirofficedesksandhomeoffices.C.PersonalcallsarerouteddirectlythroughtheresidentialPSTNline.D.Teleworkerscanhavedifferentextensionsattheirofficedesksandhomeoffices.E.ThereislessburdenonCiscoCallManagerforsignalingtraffic.F.Incomingcallsarefirstroutedtotheofficedesks,thentothehomeoffices.

考题 在有13个元素构成的有序表data[1..13]中,用折半查找(即二分查找,计算时向下取整)方式查找值等于data[8]的元素时,先后与( )等元素进行了比较。A.data[7]、data[6]、data[8] B.data[7]、data[8] C.data[7]、data[10]、data[8] D.data[7]、data[10]、data[9]、data[8]

考题 将数据库导入R语言后,可用()显示数据库结构,用()查看数据库行列数,用()查看每个变量的基本统计值。A.str(data) summary(data) dim(data)B.str(data) dim(data) summary(data)C.dim(data) summary(data) str(data)D.summary(data) dim(data) str(data)