hashCode(): This method is available in java.lang.Object class of Java.
Syntax:
int java.lang.Object.hashCode()
This method returns a hash code value for the object (ArrayDeque).
Parameters: NA
Returns: a hash code value for this object.
Exceptions: NA
Approach
Java
import java.util.ArrayDeque;public class ArrayDequehashCode {public static void main(String[] args) {ArrayDeque<Integer> arrayDeque =new ArrayDeque<Integer>();arrayDeque.add(1);arrayDeque.add(4);System.out.println(arrayDeque.hashCode());}}
Output:
1993134103
No comments:
Post a Comment