LoslegenKostenlos loslegen

Power 9000

You are attempting to read the power of a multimeter in a factory. You have to make sure that everyone knows when it gets above 9000. Otherwise, nothing should happen.

Diese Übung ist Teil des Kurses

Intermediate Java

Kurs anzeigen

Anleitung zur Übung

  • Enter the keyword allowing to check if a condition is true.
  • Use the correct operator to only display a word if it is greater than 9000.

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

class PowerChecker {
  public static void main(String[] args) {
    int power = 9000;

    // Write down the right keyword to make this a condition and use the correct operation
    ____ (power ____ 9000) {
      System.out.println("It's over 9000 !");
    }
  }
}
Code bearbeiten und ausführen