SimpleTimeZone hashCode() in Java

hashCode(): This method is available in java.util.SimpleTimeZone class of Java.

Syntax:

int java.util.SimpleTimeZone.hashCode()

This method generates the hash code for the SimpleDateFormat object.

Parameters: NA

Returns: the hash code for this object.

Exceptions: NA

Approach

Java

import java.util.SimpleTimeZone;

public class SimpleTimeZonehashCode {
    public static void main(String[] args) {

        SimpleTimeZone simpleTimeZone =
new SimpleTimeZone(100, "India");

        System.out.println(simpleTimeZone.hashCode());
    }
}

Output:

100


No comments:

Post a Comment