Robot.toString() has the following syntax.
public String toString()
In the following code shows how to use Robot.toString() method.
//from w w w . j a va 2 s.c om import java.awt.Robot; public class Main { public static void main(String[] args) throws Exception { Robot robot = new Robot(); System.out.println(robot.toString()); } }
The code above generates the following result.