What does the following line of code do?

if (num2==50){
A. It creates a variable called num2 and sets it equal to 50.
B. It checks whether a variable called num2 is equal to 50.
C. It prints num2 == 50.
D. It requests user input if the variable num2 is equal to 50.

B. It checks whether a variable called num2 is equal to 50.