Which of the following will print current time?
A
System.out.print(new LocalTime().now());
B.
System.out.print(new LocalTime());
C.
System.out.print(LocalTime.now());
D.
System.out.print(LocalTime.today());
E. None of the above.
題解
這題只是在測驗LocalTime類別的用法,參考這篇的解說:
由此可知,答案是選項C。