public class UDP implements Runnable {
private String host;
private int port;
private int delay;
private int timeout;
@Override
public void handlePacket(String host, int port, int delay, int timeout) {
UDP.host = host;
UDP.port = port;
UDP.delay = delay;
UDP.timeout = timeout;
Executors.newSingleThreadExecutor().execute(new UDP());
}
The error im getting is non static field cannot be referenced to static context I have no idea what i should do, i know a little java but i am totally lost
this, notnew UDP(), as the argument toExecutors.newSingleThreadExecutor().execute().