useDaylightTime(): This method is available in java.util.SimpleTimeZone class of Java.
Syntax:
boolean java.util.SimpleTimeZone.useDaylightTime()
This method queries if this time zone uses daylight saving time.
Parameters: NA
Returns: true if this time zone uses daylight saving time;false otherwise.
Exceptions: NA
Approach
Java
import java.util.SimpleTimeZone;public class SimpleTimeZoneuseDaylightTime {public static void main(String[] args) {SimpleTimeZone simpleTimeZone =new SimpleTimeZone(100, "India");System.out.println(simpleTimeZone.useDaylightTime());}}
Output:
false
No comments:
Post a Comment