TimeZone.useDaylightTime() has the following syntax.
public abstract boolean useDaylightTime()
In the following code shows how to use TimeZone.useDaylightTime() method.
// w ww . ja va 2s. c o m import java.util.TimeZone; public class Main { public static void main( String args[] ){ TimeZone tzone = TimeZone.getDefault(); // checking daylight time System.out.println("Using day light time :" +tzone.useDaylightTime()); } }
The code above generates the following result.