Přidat otázku mezi oblíbenéZasílat nové odpovědi e-mailem Java aplikace s vstupními parametry

public static void main(String[] args) throws IOException, InterruptedException, NumberFormatException {
    ...
    String url = args[0];

    // zacatek 23:00
    int startHodiny = Integer.parseInt(args[1]);
    int startMinuty = Integer.parseInt(args[2]);

    // konec 01:00
    int stopHodiny = Integer.parseInt(args[3]);
    int stopMinuty = Integer.parseInt(args[4]);

    while (true) {
        ...
        if (startHodiny == actHodiny && startMinuty == actMinuty) {
            ...
            start(url, stopHodiny, stopMinuty);
        } else {
            ...
        }
    }
}

public static void start(String address, int h, int m) throws IOException {
    URL url = new URL(address);
    ...
}

Reakce na odpověď

1 Zadajte svou přezdívku:
2 Napište svou odpověď:
3 Pokud chcete dostat ban, zadejte libovolný text:

Zpět do poradny