Which of the following compares the contents of an int variable named quantity with the number 5?

Question:

Which of the following compares the contents of an int variable named quantity with the number 5? 

a. if (quantity = 5) 

b. if (quantity == 5) 

c. if (quantity is 5) 

d. if (quantity =! 5)

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: