Hello! I'm trying to make a class,but an error comes up.I have also an another class named Ticket.Thanks for your help!
import java.util.*;
public class TicketPool{
ArrayList box= new ArrayList();
public void AddTickets () {
box .add(new Ticket ());
}
public void DisplayTickets (){
for (int i=0;i<box.size();i++){
System.out.println(box.get(i));
}
}
public String findTicketid(int id){
String b="The ticket is in the TicketPool";
String a="The ticket isn't in the TicketPool";
if (Ticket.getid() <= id) { //this is the error line//
return b;
}
else return a;
}