以下哪个语句能正确弹出结果( )。
A: alert( new Date( 2020 , 5 , 18).getDay( ) );
B: alert( new Date( 2020, 5 ,18 , 5 ).getDay( ) );
C: alert( new Date( 2020 , 5,18,5,9 ).getDay( ) );
D: 其它三个选项都正确。
A: alert( new Date( 2020 , 5 , 18).getDay( ) );
B: alert( new Date( 2020, 5 ,18 , 5 ).getDay( ) );
C: alert( new Date( 2020 , 5,18,5,9 ).getDay( ) );
D: 其它三个选项都正确。
举一反三
- 以下哪个语句能正确弹出结果: ( ) A: 其余三个结果都正确 B: alert(new Date(2011 , 12 , 25 , 5 , 5 , 9).getDay()); C: alert(new Date(2011 , 12 , 25 , 5).getDay()); D: alert(new Date(2011 , 12 , 25).getDay());
- 下列表达式计算结果为数值类型的是() A: #2020/5/5#-#2020/5/1# B: year(date()) C: 98+4 D: #2020/5/1#+5
- 已知 java.util.Date[] dates = new java.util.Date[10], 以下哪个描述是正确的?(). A: dates is null B: dates[0] is null C: dates = new Date() is fine, which creates a new Date object and <br/>assigns to dates D: dates = new java.util.Date[5] is wrong
- 假设创建一个Date对象所获取的时间为:2018年6月11日星期四,上午九点36分27秒,则下列说法正确的是 A: getMonth()方法返回5 B: getDay()方法返回11 C: getDate()方法返回4 D: getDay()方法返回3
- 以下对于Date对象的说法正确的是( ) A: new Date();创建一个Date对象,同时获取当前的日期时间信息。 B: getDate()从 Date 对象返回一个月中的某一天 (1 ~ 31) C: getDay()从 Date 对象返回一周中的某一天 (0 ~ 6) D: getFullYear()从 Date 对象以四位数字返回年份