编写一个类Book,具有name,price,press,author 然后创建5个对象放入ArrayList中,并实现按照price大小排序,
然后遍历ArrayList输出每个Book对象, 使用toString 方法打印。
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public class test {
public static void main(String[] args) {
Book b1 = new Book("book1", 99, "press1", "writer1");
Book b2 = new Book("book3", 9, "press2", "writer2");
Book b3 = new Book("book2", 87, "press3", "writer3");
Book b4 = new Book("book6", 45, "press4", "writer4");
Book b5 = new Book(