Witam. Tworząc projekt natknąłem się na dość poważny problem. A mianowicie nie mogę odwołać się do obiektu klasy.
public class Hire_firm {
List<User>usertab = new ArrayList<User>();
List<Vehicle>vehicleTab =new ArrayList<Vehicle>();
User user;
Car car;
public static void main(String[] args)throws IOException {
// TODO Auto-generated method stub
MainMenuFrame.main(null);
}
public String searchC(String Air_conditioning, String Body, String Gearbox)throws IOException{ //car
return car.serchC(Air_conditioning, Body, Gearbox, vehicleTab) ;
}
}
Odwołując się w ten sposób pojawia się błąd "Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException" Gdzie tkwi błąd? Z góry dzięki.