public static Date getValidDate() throws IOException { Date tdate = new Date(); int year, month, day; year= getValidYear(); month = getValidMonth(); day = getValidDay(); tdate.setDate(day); tdate.setMonth(month); tdate.setYear(year); return tdate; } public static void addEntry(Vehicle [] vehicles, int counter) throws IOException{ long kmtrage; vehicles[counter+1].setTdate(getValidDate()) ; } java.lang.NullPointerException at controlVehicular.addEntry(controlVehicular.java:552) at controlVehicular.addSearchEntry(controlVehicular.java:661) :<