I changed lines 19-35 to:
String productID = "";
        String productName = reader.readLine();
        String productPrice = reader.readLine();
        String productQuantity = reader.readLine();

        String product = "";

            productID = getID(fileName);
            productName = fullName(productName);
            productPrice = fullPrice(productPrice);
            productQuantity = fullQuantity(productQuantity);
            product = productID + productName + productPrice + productQuantity;

            writer.write("\n" + product);
in order to test the code and used the following input: C:\Users\User\Products.txt swimming trunks 150.00 5 and the program threw a NullPointerException