当尝试对对象数组进行冒泡排序时,某些东西似乎读为 null,但它似乎不是 null 什么被读为 null?
for(int i =0; i<(count-1); i++)
{
for(int j=(i+1);i<count;j++)
{
if((books[j].getAuthor()).compareTo((books[i].getAuthor()))>0)
{
temp = books[i];
books[i] = books[j];
books[j] = temp;
}
}
}