1 /*integer type byte shor int long default initial value is 0;2 Float type float double the default initialization value is 0.0;3 the default value of Boolean type bool is false;4 The default initialization value for character type char is ' \u0000 ';5 6 */7 8 9 classdemo2_array{Ten String S; One CharC; A - Public Static voidMain (string[] args) { - theDemo2_array A =NewDemo2_array (); -System.out.println (A.S);//NULL - System.out.println (A.C); - - +String s= "11111"; A System.out.println (s); at int[] arr =New int[5];//to access an array by array Arr[number] -System.out.println (Arr[0]);//The array gives the default initial value, and the integer type is 0 -arr[0]=10; -System.out.println (arr[0]); - - instring[] str =NewString[5]; -System.out.println (Str[0]);//or null to +str[0]= "123"; -System.out.println (str[0]); the *System.out.println (arr);//[ [email protected] [represents an array I represents an int type 7852e922 memory address $ }Panax Notoginseng}
38 access to dynamic assignment and numeric values for arrays