Ultra Geile Studenten Benutzer Oberfläche (UGSBO)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
664 B

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. package com.ugsbo.IsMyComputerOn;
  2. import java.util.concurrent.TimeUnit;
  3. public class IsMyComputerOn_App {
  4. public static void main(String[] args) {
  5. while (true) {
  6. System.out.print("Dein Rechner ist: ");
  7. System.out.println((IstErAn()?"AN":"AUS"));
  8. try {
  9. TimeUnit.MINUTES.sleep(1);
  10. } catch (InterruptedException e) {
  11. // TODO Auto-generated catch block
  12. e.printStackTrace();
  13. }
  14. }
  15. }
  16. /***
  17. *
  18. * @return true Da wir davon ausgehen, dass das Program nur ausgeführt werden kann wenn der Rechner läuft, geben wir immer true zurück.
  19. */
  20. public static boolean IstErAn() {
  21. // TODO Auto-generated method stub
  22. return true;
  23. }
  24. }