在下面附属类方法中的下划线处应填入的正确参数是[u] [/u]。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
A: Employee[ ] e
B: “employee.dat”
C: PrintWriter out
D: BufferedWriter
举一反三
- 在下面附属类方法中的下划线处应填入的正确参数是[u] [/u]。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
- 智慧职教: Calendar calendar = Calendar.getInstance(); year = 【1】.get(Calendar.YEAR); month = calendar.get(Calendar.MONTH); 这一段代码是实例化Calendar类,并给变量year,和month赋值功能。【1】处的代码是()
- 下面哪个方法可以获得Calendar实例( ) A: new Calendar() B: Calendar.getInstance() C: get(Calendar.YEAR)) D: get(Calendar.MONTH))
- 有关Calendar类说法正确的是( )。 A: Calendar类是一个抽象类 B: Calendar类提供了日历功能 C: GregorianCalendar类是Calendar的父类 D: 可以使用Calendar类的static方法初始化一个日历对象 E: Calendar类在java.text包中
- 获取Calendar类型对象的语句是() A: Calendar c = new Calendar( ); B: Calendar c =Calendar.getInstance( ); C: Date d = new Date( );Calendar c = (Calendar)d;