Hi,
I created Food.java and FoodMain.java classes under the directory
".../foodpackage/fruitpackage" I wrote the Food class and I added two very
simple methods in it. I added "package foodpackage.fruitpackage ;" top of
Food class. Then I wrote main class FoodMain.java. I created an object of
Food class as "Food hamburger=new Food();". I used command prompt javac for
both. Food.class was created  without trouble. Hoewever, There occured an
error when I apply it to FoodMain.java.It says
"cannot access Food. Class file contains wrong
class:foodpackage.fruitpackage.Food. Please remove or make sure it appears
in the correct subdirectory of the classpath.
Food hamburger=new Food();" Error occurs at this line. What might be the
problem?
Thanks in advance

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to