Java SimpleTimeZone.hashCode() method example

 Posted On  | Pooja Lakkihal 

In this tutorial, You will learn how to generate the hash code. Java SimpleTimeZone.hashCode() method returns hash code for this object.

Generates the hash code for the SimpleDateFormat object.


public int hashCode()


The hash code for this object.

Java SimpleTimeZone hashCode() example

  • new SimpleTimeZone(300, "INDIA"); It will construct a SimpleTimeZone with the given base time zone.
  • simpleTimeZone.hashCode(); It will generate the hash code.
package com.technicalkeeda;

import java.util.SimpleTimeZone;

public class App {

    public static void main(String[] args) {

        SimpleTimeZone simpleTimeZone = new SimpleTimeZone(300, "INDIA");

        System.out.println("HashCode is :- " + simpleTimeZone.hashCode());


HashCode is :- 300

© 2018

 |  Find us on Google+ |  Rss Feed

Loaded in 0.0442 seconds.