下面程序执行的输出结果是public class MaxTest{public static void main(String[] args){System.out.println(“” + Math.max(5, -5));}}
A. 5
B. -5
C. 0
D. 程序不能编译
查看答案
下面哪个赋值语句是错误的?
A. int i = (short)3;
B. int i = new Integer(5).intValue();
C. int i = (integer)3;
D. int i = (int)3.14;
要创建一个系统默认时区的当前日期LocalDate对象,下面哪个是合法的?
A. LocalDate today = new LocalDate();
B. LocalDate today = LocalDate.now();
C. LocalDate today = LocalDate.of();
D. LocalDate today = LocalDate.date();
写一个语句创建当前系统默认的本地日期对象,正确的是___________。
A. LocalDate today = new LocalDate();
B. LocalDate today = LocalDate.today();
C. LocalDate today = LocalDate.now();
D. LocalDate today = new MyDate();
给定日期对象today,要得到该日期是星期几,下面表达式正确的是___________。
A. today.getWeek()
B. today.getDayOfWeek()
C. today.getDay()
D. today.getDayOMonth()