Engineering Full Stack Apps with Java and JavaScript
What will be the result of attempting to compile and run the following class?
public class TestClass{ public static void main(String args[ ] ){ int i, j, k; i = j = k = 9; System.out.println(i); } }
Select 2 options
A. The code will not compile because unlike in c++, operator '=' cannot be chained
i.e. a = b = c = d is invalid.
B. The code will not compile as 'j' is being used before getting initialized.
C. The code will compile correctly and will display '9' when run.
D. The code will not compile as 'j' and 'i' are being used before getting initialized.
E. All the variables will get a value of 9.