Java TimeZone LONG

Syntax

TimeZone.LONG has the following syntax.

public static final int LONG

Example

In the following code shows how to use TimeZone.LONG field.


//w  w  w .ja v  a 2 s.c om
import java.util.TimeZone;

public class Main {
   public static void main( String args[] ){
       
      // create default time zone object
      TimeZone timezonedefault = TimeZone.getDefault();
      
      // get display name
      String disname=timezonedefault.getDisplayName(true,TimeZone.LONG); 
   
      // checking display name         
      System.out.println("Display name is :" + disname);
   }    
}

The code above generates the following result.