Basic Datatypes
- How to get difference between two dates?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
Java 8 provides a method called between which provides Duration between two times.
- What does LocalTime represent?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
LocalTime of joda library represents time without date.
- What is the range of short data type in Java?
-
View Hint View Answer Discuss in Forum
Short occupies 16 bits in memory.
Correct Option: B
Short occupies 16 bits in memory. Its range is from - 215 to 215 - 1
i.e. -32768 to 32767.
- What is the replacement of joda time library in java 8?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
In java 8,we are asked to migrate to java.time (JSR-310) which is a core part of the JDK which replaces joda library project.
- How to identify if a timezone is eligible for DayLight Saving?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
public abstract boolean useDaylightTime() is provided in TimeZone class.