Unresolved argument help
Hello, I'm getting "Meat unresolved" message in compiler with the following bit of code. Meat is the name of another class in the same project, just don't know why it can't resolve the class name.
Thanks for the help
List<Garnish> garnishes= new ArrayList(10);
List<Sauce> suaces= new ArrayList(10);
List<Meat> meats= new ArrayList(10);
i will help you ;-)
ok try to use qualified class names.... put the whole path infront of the class' name like
java.util.HashMap<java.lang.String, java.lang.String> testMap = new java.util.HashMap<java.lang.String, java.lang.String>()
maybe you have forgotten to import it? in the same project doesn't mean necessarrily mean that it's in the same package - so if you have it in another package...?
another reason is the visibility of your class Meat... more code about the meatclass and maybe your package structure would surely be helpful!
All the classes in the project are in the same package, the problem is not restricted to the Meat class all the classes are giving the samer error. Am I just not passing the argument correctly? I'm trying to pass the class name to a method. However when I use the class name in a generic for a List it doesn't show the error, for this List<Meat> meats= new ArrayList(10)
please send the code - i will find out, fix it and give an answer to the problem in this forum -> send it to email@example.com
OK, I sent the code, thanks for the help.
ok... you cannot hand over the actual class to your "public void orderFood (Class foodType, int numItems) you have to hand over "orderFood(Meat.class, 10);" instead of just Meat. btw: you forgot to send me the sauce and the delicious garnish... did that solve your problems? i hardly took a look at your code, cause i guess this was what you needed (if not please tell me), but i would advice you to keep to the standards and name your packages in lower case manner. hope i was right with my quick guess.
By Vidhi in forum VB Classic
Last Post: 06-09-2006, 02:56 PM
By ziphnor in forum ASP.NET
Last Post: 03-18-2005, 02:30 AM
By ozmanbozman in forum C++
Last Post: 02-17-2005, 06:39 AM
By Frustrated in forum Enterprise
Last Post: 04-10-2002, 10:36 PM
Last Post: 11-10-2000, 10:08 AM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center