java打印char數組名

public class Example {

	public static void main(String args[]) {
		char a[] = { 'a', 'b', 'c' };
		System.out.println(a);

		int b[] = { 1, 2, 3 };
		System.out.println(b);

		String c[] = { "d", "e", "f" };
		System.out.println(c);
	}

}

運行結果:

abc
[I@15db9742
[Ljava.lang.String;@6d06d69c

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章