if else if失效,所以只用if if就好了
if(oldbooks !=null)
{
Iterator it2 = oldbooks.iterator();
while (it2.hasNext())
{
Book bk2 = (Book)it2.next();
System.out.println(bk2.getB_id()+" "+bk2.getB_name()+" "+bk2.getFirst_time());
}
System.out.println("- - - - - - ");
}
if(newbooks !=null)
{
Iterator it1 = newbooks.iterator();
while (it1.hasNext())
{
Book bk1 = (Book)it1.next();
System.out.println(bk1.getB_id()+" "+bk1.getB_name()+" "+bk1.getFirst_time());
}
System.out.println("- - - - - - ");
}