Java Swing Tutorial - Java DataFlavor.toString()


DataFlavor.toString() has the following syntax.

public String toString()


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

//  ww  w  .j a  v a2 s .  co m
import java.awt.datatransfer.DataFlavor;

public class Main {

  public static void main(String[] args) {

    DataFlavor df = DataFlavor.stringFlavor;

    System.out.println (df.toString());

The code above generates the following result.