Java Date Time - Java SimpleTimeZone.hashCode()








Syntax

SimpleTimeZone.hashCode() has the following syntax.

public int hashCode()

Example

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

//from   ww w. j av a2  s  .c o m


import java.util.SimpleTimeZone;

public class Main {
   public static void main( String args[] ){
       
      SimpleTimeZone stobj = new SimpleTimeZone(820,"US");
      
      // get hash code
      int hashcode=stobj.hashCode();
      
      // check hash code value       
      System.out.println("Hash code is : " + hashcode);
   }     
}

The code above generates the following result.