I started learning Java last week so bear with me as I'm just getting the hang of things. I'm trying to make a class that extends the Java Robot class.
I am getting an "Identifier Expected" on this line:
public ChanseyRobot(bot)
Robot Class:
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.awt.MouseInfo;
public class ChanseyRobot extends Robot
{
private Robot bot;
public ChanseyRobot(bot)
{
try
{
this.bot = new Robot();
}
catch (AWTException e)
{
throw new RuntimeException(e);
}
}
}
Main Class:
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.awt.MouseInfo;
public class Main
{
public static void main(String args[])
{
ChanseyRobot robot = new ChanseyRobot(robot);
}
}