About Question enthuware.ocpjp.i.v11.2.3237 :
Posted: Sat Feb 15, 2020 9:00 am
I have a question about the explanation of 5th array declaration:
Option 5 creates a one dimensional array and that too of Strings. Note that a java String is not equivalent to a one dimensional array of chars.
I agree that the right side of equals operand does it, but it does not match declaration, so such a line won't even compile. I think it's worth noting.
Code: Select all
char[][] cA = {"1234", "1234", "1234"};
I agree that the right side of equals operand does it, but it does not match declaration, so such a line won't even compile. I think it's worth noting.