1.
int[] arr = new int[10]; System.out.println(arr);//地址值?
char[] arr1 = new char[10]; System.out.println(arr1); //地址值?
测试:
public class ArrayPrintTest {
public static void main(String[] args) {
int[] arr = new int[]{1,2,3};
System.out.println(arr);//地址值
char[] arr1 = new char[]{‘a‘,‘b‘,‘c‘};
System.out.println(arr1); //abc
}
}
原因:
原文地址:https://www.cnblogs.com/terrycode/p/12272407.html
时间: 2024-11-06 07:12:26