阅读下列代码importjava.io.*;publicclassExample{publicstaticvoidmain(String[]args)throwsException{FileInputStreamin=newFileInputStream("itcast.txt");intb=0;while(true){b=in.______;if(b==-1){break;}System.out.println(b);}in.close()}}下列选项中,填写在程序空白处正确的是()
举一反三
- 阅读下段代码importjava.io.*;publicclassExample{publicstaticvoidmain(String[]args)throwsException{FileInputStreamfis=newFileInputStream("file.txt");FileOutputStreamfos=newFileOutputStream("copy_file.txt");intch=0;while((ch=fis.read())!=-1){fos.write(ch);}fos._______;fis.close();}}请说出下划线上,填写的方法名称
- 阅读下列代码 import java.io.*; public class Example { public static void main(String[] args) throws Exception { FileInputStream in = new FileInputStream("itcast.txt"); int b = 0; while (true) { b = in.______; if (b == -1) { break; } System.out.println(b); } in.close() } } 请说出下划线上,填写的方法名称
- 关于下面代码的说法()是正确的? publicclassExample{ publicstaticvoidmain(String[]args){ int[]arr=newint[10]; System.out.println(arr[1]); } }
- 阅读下列代码 publicclassExample{ publicstaticvoidmain(String[]args){ int[]srcArray={11,12,13,14}; int[]destArray={21,22,23,24}; System.arraycopy(srcArray,1,destArray,2,2); for(inti=0;i<destArray.length;i++){ System.out.print(destArray[i]+); } } } 下列选项中,程序的运行结果是()
- 阅读下列的程序 publicclassTest3{ publicstaticvoidmain(String[]args){__________________________________________________}} classOuter{ staticclassInner{ publicvoidmethod(){ System.out.println(}}} 下列选项中,可以正确输出method()方法的是