Current location - Loan Platform Complete Network - Big data management - Usage of string in Java arrays
Usage of string in Java arrays
String a[ ]={"1", "2", "3", "4",null};

String b[ ]={"1", "2", "3", "4",'c'};

A is correct.

null denotes a null pointer, so you can understand that it has no type, but it can also be of any type (any pointer can be set to null).

And in B, of course, you can't assign a character type (basic type) to a string type (class type).