#java files in the same package but getting package error

4 messages · Page 1 of 1 (latest)

fiery bane
#

so i have one main java file and the 5 other files are supposed to be just operating in the background. i have the files in one package folder and i added this line to all of them

package mypackage;

but im getting this error

CoffeeMachine.java:5: error: cannot find symbol
    private ResourceManager resourceManager;
            ^
  symbol:   class ResourceManager
  location: class CoffeeMachine
CoffeeMachine.java:8: error: cannot find symbol
    public CoffeeMachine(ResourceManager resourceManager, double money) {
                         ^
  symbol:   class ResourceManager
  location: class CoffeeMachine
CoffeeMachine.java:76: error: cannot find symbol
    private void processCoins(Coffee coffee) {
                              ^
  symbol:   class Coffee
  location: class CoffeeMachine
CoffeeMachine.java:14: error: cannot find symbol
        ResourceManager initialResources = new ResourceManager(1000, 1000, 500);
        ^
  symbol:   class ResourceManager
  location: class CoffeeMachine
CoffeeMachine.java:14: error: cannot find symbol
        ResourceManager initialResources = new ResourceManager(1000, 1000, 500);
                                               ^
  symbol:   class ResourceManager
  location: class CoffeeMachine
CoffeeMachine.java:52: error: cannot find symbol
        Coffee coffee = null;
        ^
  symbol:   class Coffee
  location: class CoffeeMachine
CoffeeMachine.java:56: error: cannot find symbol
                coffee = new CoffeeEspresso();
                             ^
  symbol:   class CoffeeEspresso
  location: class CoffeeMachine
CoffeeMachine.java:59: error: cannot find symbol
                coffee = new CoffeeLatte();
                             ^
  symbol:   class CoffeeLatte
  location: class CoffeeMachine
CoffeeMachine.java:62: error: cannot find symbol
                coffee = new CoffeeCappuccino();
                             ^
  symbol:   class CoffeeCappuccino
  location: class CoffeeMachine
9 errors
oak owlBOT
#

This post has been reserved for your question.

Hey @fiery bane! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

topaz scaffold
#

How is the folder called, what command do you run, and so on. You should be able to understand we can't guess what you have, without needing to be told