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.
Cet exercice fait partie du cours
Intermediate Java
Instructions
- 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.
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
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 !");
}
}
}