在下面附属类方法中的下划线处应填入的正确参数是public void writeData( )throws IOException{ GregorianCalendar calendar=new GregorianCalendar(); calendar,setTime(hireDay); out.println(name+"|" +salary+"|" +calendar.get(Calendar.YEAR)+"|" +(calendar.get(Calendar.MONTH)+1)+"|" +calendar.get(Calendar.DAY_OF_MONTH)):}A.Employee[]eB.employee.datC.PrintWriter outD.BufferedWriter
在下面附属类方法中的下划线处应填入的正确参数是public void writeData( )throws IOException{ GregorianCalendar calendar=new GregorianCalendar(); calendar,setTime(hireDay); out.println(name+"|" +salary+"|" +calendar.get(Calendar.YEAR)+"|" +(calendar.get(Calendar.MONTH)+1)+"|" +calendar.get(Calendar.DAY_OF_MONTH)):}
A.Employee[]e
B.employee.dat
C.PrintWriter out
D.BufferedWriter
相关考题:
阅读下面程序import java.io.*;public class ByteStream Test{public static void main(String[] a){int[] myArray = {10,20.30,40};try{DataOutputStream dos = new DataOutputStream(new _________________( " ints.dat " ));for (int i=0;imyArray.length;i++)dos.writeInt(myArray[i] ) ;dos.close();S ystem.out.println( " Have written binary file ints.dat " );}catch (IOException ioc){System.out.println( " IO Exception " );}}}为保证程序正确运行,在程序中下划线处应填入的代码是A)FileOutputStreamB)ByteArrayOutputStreamC)BufferedOutputStreamD)FileWriter
在下面附属类方法中的下划线处应填入的正确参数是 public void writeData(______)throws IOException{ GregorianCalendar calendar=new GregorianCalendar(); calendar.setTime(hireDay); out.println(name+"|"+salary+"|" +calendar.get(Calendar.YEAR)+"|" +(calendar.get(Calendar.MQNTH)+1)+"|" +calendar.get(Calendar.DAY_OF_MONTH)); }A.Employee[]eB.employee.datC.PrintWriter outD.BufferedWriter
在下面附属类方法中的下划线处应填入的正确参数是( )。 public void writeData(________) throws IOException{ GregorianCalendar calendar=new GregorianCalendar(); calendar.setTime(hireDay); out.println(name+"|"+salary+"|" +calendar.get(Calendar.YEAR)+"|" +(calendar.get(Calendar.MONTH)+1)+"|" +calendar.get(Calendar.DAY_OF_MONTH)); }A.Employee[]eB.employee.datC.PrintWriter outD.BufferedWriter
在下面程序中,括号里应填()。 include using namespace std; class A { public: void 在下面程序中,括号里应填( )。 #include <iostream> using namespace std; class A { public: void fun( ) { cout << "Hello" << endl; } }; class B:: public A { void fun( ) { ( ) //调用基类的函数fun( ) tout << "HI" << endl; } };A.fun()B.A. fun()C.A::fun()D.A-fun(
阅读下面程序 import java.io.*; public class ByteStreamTest { public static void main(String[] A) { int [] myArray = {10,20,30,40 }; try{ DataOutputStream dos = new DataOutputStream ( new______ ("ints.dat")); for (int i=0; i<myArray, length; i++) dos.writelnt( myArray[i] ); dos.close(); System.out.println("Have written binary file ints.dat"); } catch (IOException ioe){ Sy stem.out.println("IO Exception"); } } } 为保证程序正确运行,在程序中下划线处应填入的代码是A.FileOutputStreamB.ByteArrayOutputStreamC.BufferedOutputStreamD.FileWriter
在下面附属类方法中的下划线处应填入的正确参数是( )。 public void writeData( ______ ) throws IOException{ GregorianCalendar calendar=new GregorianCalendar(); calendar.setTime(hireDay); out.println(name+"|"+salary+"|" +calendar.get(Calendar.YEAR)+"I" +(calendar.get(Calendar.MONTH)+1)+"|" +calendar.get(Calendar.DAY_OF_MONTH)); }A.Employee[]eB.employee.datC.PrintWriter outD.BufferedWriter
3在下面附属类方法中的下划线处应填入的正确参数是( )。 public void writeData(______)throws IOException { GregorianCalendar calendar=new GregorianCalendar(); calendar.setTime(hireDay); out.println(name+"T" +salary+"|" +calendar.get(Calendar.YEAR)+"|" +(calendar.get(Calendar.MONTH)+1)+ "|" +calandar.get(Calendar.DAY_OF_MONTH)); }A.Employee[] eB.employee.datC.PrintWriter outD.BufferedWriter
25、在堆栈类StackTest的定义中,为了保证堆栈在并发操作中数据的正确性,应在下划线处填入的代码自上而下分别是________。 public class StackTest{ private int idx = 0; private char[] data = new char[10]; public _____ void push(char c) {……} public______ void pop() {……} }A.不用填写,synchronizedB.都不用填写C.synchronized,synchronizedD.synchronized, 不用填写
在堆栈类StackTest的定义中,为了保证堆栈在并发操作中数据的正确性,应在下划线处填入的代码自上而下分别是________。 public class StackTest{ private int idx = 0; private char[] data = new char[10]; public _____ void push(char c) {……} public______ void pop() {……} }A.不用填写,synchronizedB.都不用填写C.synchronized,synchronizedD.synchronized, 不用填写