Q:

Using Java How do you leep the machine awake?

0

Using Java How do you keep the machine awake?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import java.awt.*;
import java.util.*;
public class Hal{
    public static void main(String[] args) throws Exception{
        Robot hal = new Robot();
        Random random = new Random();
        while(true){
            hal.delay(1000 * 60);
            int x = random.nextInt() % 640;
            int y = random.nextInt() % 480;
            hal.mouseMove(x,y);
        }
    }
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now