Your class is Products not Product
Type: Posts; User: newbie
Your class is Products not Product
Well the answer is in the error message, " missing return statement".
Take the String example, if you declare a method such as it returns a String, you really do need to return a String.
If...
I'm assuming you want to return your Products object, so all you need to do is change the method declaration from void, to a return type of Products.
then in your method, use return p;
E.g
To...