What is the output of the following?
public class Main { public static void main(String[] black) { String s = 'b'; String tail = "B"; s = s.concat(tail); System.out.println(s); } }
C.
The declaration of s is incorrect.
It tries to store a char into a String variable reference.
This does not compile, making Option C correct.
If this was fixed, the answer would be Option B.