Java Swing Tutorial - Java DataFlavor.hashCode()








Syntax

DataFlavor.hashCode() has the following syntax.

public int hashCode()

Example

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

import java.awt.datatransfer.DataFlavor;
/*ww  w  .  j  a  v  a 2 s. c o m*/
public class Main {

  public static void main(String[] args) {

    DataFlavor df = DataFlavor.stringFlavor;

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

The code above generates the following result.