Multiple Choice
If chr is a character variable, which of the following if statements is written correctly?
A) if (chr = "a")
B) if (chr == "a")
C) if (chr = 'a')
D) if (chr == 'a')
Correct Answer:

Verified
Correct Answer:
Verified
Related Questions
Q17: The String.format method works exactly like the
Q32: Which of the following will format
Q34: If str1 and str2 are both Strings,
Q35: A Boolean expression is one that is
Q36: Which one of the following is the
Q37: What will be the value of x
Q38: Because the && operator performs short-circuit evaluation,
Q40: An important style rule you should adopt
Q42: Unicode is an international encoding system that
Q44: _ works like this: If the expression