I'm retreiving the list of product bought by the user but I'm getting an error since in the constructer product is of type List. I didn't knew how to convert it
String buyer = request.getParameter("buyer");
List prodlist = request.getParameter("product");
Bill bill = new Bill(buyer, prodlist);
here is the code of the constructeur
public Bill(String buyer, List<Product> product) {
super();
this.buyer = buyer;
this.product= product;
}
the attribute of the class Product
private int id;
private String name;
private float price;