DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2006

    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.
    public Pantry(){
    		List<Garnish> garnishes= new ArrayList(10);
    		List<Sauce> suaces= new ArrayList(10);
    		List<Meat> meats= new ArrayList(10);
    		orderFood(Meat, 10);
    		orderFood(Garnish, 10);
    		orderFood(Sauce, 10);
    Thanks for the help

  2. #2
    Join Date
    Nov 2006

    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!

  3. #3
    Join Date
    Nov 2006
    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)

  4. #4
    Join Date
    Nov 2006
    please send the code - i will find out, fix it and give an answer to the problem in this forum -> send it to moccamixer@web.de

  5. #5
    Join Date
    Nov 2006
    OK, I sent the code, thanks for the help.

  6. #6
    Join Date
    Nov 2006
    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.

Similar Threads

  1. Invalid proc call or argument : Urgent
    By Vidhi in forum VB Classic
    Replies: 1
    Last Post: 06-09-2006, 02:56 PM
  2. Replies: 0
    Last Post: 03-18-2005, 02:30 AM
  3. random() and srandom() unresolved links
    By ozmanbozman in forum C++
    Replies: 25
    Last Post: 02-17-2005, 06:39 AM
  4. Handling unresolved addresses (ie: *@domain.tld)
    By Frustrated in forum Enterprise
    Replies: 2
    Last Post: 04-10-2002, 10:36 PM
  5. Unresolved Symbol Error
    By Jenifer in forum Java
    Replies: 1
    Last Post: 11-10-2000, 10:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.