How to get difference between two dates?
A. long diffInMilli = java.time.Duration.between(dateTime1, dateTime2).toMillis();
B. long diffInMilli = java.time.difference(dateTime1, dateTime2).toMillis();
C. Date diffInMilli = java.time.Duration.between(dateTime1, dateTime2).toMillis();
D. Time diffInMilli = java.time.Duration.between(dateTime1, dateTime2).toMillis();
Answer: Option A
Related Questions on Data Types and Variables
Which of the following is not a valid identifier for a Java variable?
A. my_var
B. _myVar
C. 3rdVar
D. $var

Join The Discussion