题目内容

常量 Calendar.MONTH代表月份,1月-12月的值分别对应-;常量Calendar.DAY_OF_WEEK代表星期几,星期日-星期六分别对应-。

查看答案
更多问题

Date date=new Date();SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");String now=sdf. (date));String s=”1972-12-12”;Date date=sdf. (s);

Given:int i = (int)Math.random();What is the value of i ?Correct Answers:

A. 0
B. 1
Compilation fails.
D. any positive integer between 0 and Integer.MAX_VALUE
E. any positive integer between 0 and Integer.MAX_VALUEE: any integer between Integer.MIN_VALUE and Integer.MAX_VALUE

Given:String s = "Hello" + 9 + 1;System.out.println(s);What is the result?Correct Answers:

A. Hello91
B. Hello10
Compilation fails.
D. An exception is thrown at runtime.

Given:Math.ceil(0.1 + Math.floor(Math.random()));Which two are the type and value of the expression? (Choose two.)Correct Answers:

A. 0.0
B. 1.0
C. float
D. double
E. a random value
F. a random value between 0.0 and 1.0
G. a random value between 0.0 and less than 1.0

答案查题题库