Answer:

The boolean expression is true

34 > 2   ||   5 == 7
------        -----
 true         false
   --------------
       true

because all OR needs is one true.

Try the Program Yourself

Here is a simulation of the car credit program. The simulation is written in JavaScript, but it works like Java. Enter integers in the boxes.


How much cash do you have?   

How much credit do you have?  

  if ( cash>=25000 || credit>=25000 )
    System.out.println("Enough to buy this car!");
  else
    System.out.println("Have you considered a Yugo?");
  


Try the program out with various values of cash and credit to check that you understand how OR works.

QUESTION 20:

What does the program do if the user enters negative numbers?