Java IO Tutorial - Java LongBuffer.hashCode()








Syntax

LongBuffer.hashCode() has the following syntax.

public int hashCode()

Example

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

import java.nio.LongBuffer;
/* w  ww .  j  av  a 2 s  .  com*/
public class Main {
  public static void main(String[] args) {
    LongBuffer bb = LongBuffer.allocate(10);
    bb.put(100);
    System.out.println(bb.hashCode());

  }
}

The code above generates the following result.