System.out.print("Enter the Item number of what is to be changed");
String itemNO = in.next();
for (int i = 0; i<NewItem.itemArray.length; i++)
{
String value = NewItem.itemArray[i][3];
if(value.equals(itemNO))
{
//Rest of the code here
}
}
When running the program, it throws an exception at "if(value.equals(itemNO))". This is the error it shows.
Exception in thread "main" java.lang.NullPointerException
at DeleteItem.deleteItem(DeleteItem.java:34)
at EditItemDetails.editItem(EditItemDetails.java:25)
at CD_Universe.editItemDetailsActions(CD_Universe.java:84)
at CD_Universe.main(CD_Universe.java:109)