public class GreaterThanPriceExample
{
public static void main(String args[])
{
// GreaterThanPriceExample
double price = 10.0; // Change as needed.
if (price >= 10.0)
System.out.println("The price is too high.");
else
System.out.println("The price is OK.");
}
}
The price is too high.
--- Output Ends ---
- javac GreaterThanPriceExample.java
- java GreaterThanPriceExample