Code a Boolean expression that tests if a decimal variable named currentSales is greater than or equal to 1000 or a Boolean variable named newCustomer is equal to true. Code this statement so both conditions will always be tested, and code it in the shortest way possible.

Respuesta :

ijeggs

Answer:

public class ANot {

   public static void main(String[] args) {

   //Scanner in = new Scanner (System.in);

   boolean newCustomer = true;

   double currentSales =1000;

   if (newCustomer||(currentSales>=1000)){

       System.out.println("New Customer is true and current sales is greater or equal to 1000");

   }

   }

Explanation:

  1. The code is given in Java progamming language
  2. Create and initialize the variables (Boolean and double) as required by the question
  3. Use the if statement with the OR operator (||) to test both condition