举一反三
- Calendar类中,表示当前日期是星期几的类常量是( )。 A: Calendar.DAY_OF_YEAR B: Calendar.DAY_OF_MONTH C: Calendar.DAY_OF_WEEK_IN_MONTH D: Calendar.DAY_OF_WEEK
- 智慧职教: Calendar calendar = Calendar.getInstance(); year = 【1】.get(Calendar.YEAR); month = calendar.get(Calendar.MONTH); 这一段代码是实例化Calendar类,并给变量year,和month赋值功能。【1】处的代码是()
- 中国大学MOOC: Calendar类中,表示当前日期是星期几的类常量是( )。
- 在下面附属类方法中的下划线处应填入的正确参数是______。 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类型对象的语句是() A: Calendar c = new Calendar( ); B: Calendar c =Calendar.getInstance( ); C: Date d = new Date( );Calendar c = (Calendar)d;
内容
- 0
public static void main(String[] args) {// 获取表示当前时间的Calendar对象Calendar calendar = Calendar.getInstance();// 设置指定日期,将MONTH设为13calendar.set(Calendar.MONTH, 13);System.out.println(calendar.getTime());// 开启non-lenient模式____________________________;calendar.set(Calendar.MONTH, 13);System.out.println(calendar.getTime());}
- 1
When is New Year’s Day? A: January 1st in lunar calendar B: February 1st in lunar calendar C: January 1st in solar calendar D: February 1st in solar calendar
- 2
下面哪个方法可以获得Calendar实例( ) A: new Calendar() B: Calendar.getInstance() C: get(Calendar.YEAR)) D: get(Calendar.MONTH))
- 3
The fifth day of the fifth month in the Chinese lunar calendar is also called _________.
- 4
World Ocean Day in the environmental calendar began on 8 June 1992. It was