```
public void method1 (int x) {
    if (x == 1) {
        try {
            Robot r = new Robot();
        } catch (AWTException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        r.mouseMove(50,50);

```

But this gives r cannot be resolved. Any ideas? =/ Thanks a lot