Java IO Tutorial - Java FloatBuffer.hashCode()








Syntax

FloatBuffer.hashCode() has the following syntax.

public int hashCode()

Example

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

import java.nio.FloatBuffer;
/*from  w  w  w  .  jav  a  2  s .com*/
public class Main {
  public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);
    
    floatBuffer.put(1,1.23F);
    
    System.out.println(floatBuffer.hashCode());

  }
}

The code above generates the following result.