Java SimpleTimeZone.toString()

Syntax

SimpleTimeZone.toString() has the following syntax.

public String toString()

Example

In the following code shows how to use SimpleTimeZone.toString() method.


//w  w w  .ja v a2 s . co m

import java.util.SimpleTimeZone;

public class Main {
   public static void main( String args[] ){
      
      SimpleTimeZone stobj = new SimpleTimeZone(820,"US");
      
      // get string value of time zone     
      System.out.println("String value is : " + stobj.toString());
   }      
}

The code above generates the following result.