Correct statement about if condition - Java Quiz Question


Which of the following statements is true.

1. for every 'if' there should be an 'else'.
2. for every 'else' there should be an 'if'.
3. 'if' block can exist without an 'else'
4. 'if' condition can be used inside another 'if' condition.


A
Only 2, 3 and 4 are true
B
All of the statements are true.
C
Only 2 and 3 are true
D
Only 3 is true.