If I allocate array of characters like this:
char[] buffer = new char[26];
what are the default values it is allocated with? I tried to print it and it is just an empty character.
System.out.println("this is what is inside=>" + buffer[1]);
this is what is inside=>
Is there an ASCII code for it? I need to be able to determine if the array is empty or not, and further on, when I fill say first five elements with chars, I need to find out that the sixth element is empty. Thanks.
\u0000. test like thisbuffer[1] == '\u0000'that will returntrueif it's not initialized or has default value.Listto check for empty list that auto grow and shrink based on no of elements because checking each and every element in array for empty array will result intoO(n)complexity which is not good.\u0000the same as\0?