简单给出一段代码说明问题:

public class Main {	
	public static void main(String[] args) {		
		double a[]={1,4,3,2};

		System.out.println(a);
		System.out.print(Arrays.toString(a));

	}
}

输出结果将是这样的:

[D@139a55
[1.0, 2.0, 3.0, 4.0]

造成第一种的输出情况应该是直接将数组名(引用)作为输出对象造成的。

相关文章:

  • 2021-11-20
  • 2021-08-22
  • 2021-12-15
  • 2021-05-11
  • 2021-09-01
  • 2021-08-10
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-23
  • 2022-12-23
  • 2021-06-21
  • 2022-12-23
  • 2022-12-23
  • 2021-05-21
  • 2021-04-06
相关资源
相似解决方案