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.
This exercise is part of the course
Intermediate Java
Exercise 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.
Hands-on interactive exercise
Have a go at this exercise by completing this sample 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 !");
}
}
}