我总是得到下面的输出,当我试图从一个阵列输出:阵列输出? Java的
[email protected]
可能有人请告诉我,我做错了什么?
Buch[] buch = new Buch[30];
for(int i = 1; i < buch.length; i++) {
buch[i] = new Buch();
char reply;
Scanner in = new Scanner(System.in);
// input data into the Array
//.....
System.out.println(buch[i]);
'System.out.println(buch [i] .getXxx())' – 2013-10-21 11:25:39
覆盖Buch类中Object类的toString方法。信息[这里] [1] [1]:http://stackoverflow.com/questions/3615721/how-to-use-the-tostring-method-in-java –