-1

Sorry, I'm sure this is some rookie istake I'm making but I have a MVC pattern package which keeps returning this errors to me:

======================================
hrms.java:22: error: cannot find symbol
        hrmsModel HRMSModel = new hrmsModel();
        ^
  symbol:   class hrmsModel
  location: class HRMS
hrms.java:22: error: cannot find symbol
        hrmsModel HRMSModel = new hrmsModel();
                                  ^
  symbol:   class hrmsModel
  location: class HRMS
hrms.java:24: error: cannot find symbol
        hrmsView view = new hrmsView(HRMSModel);
        ^
  symbol:   class hrmsView
  location: class HRMS
hrms.java:24: error: cannot find symbol
        hrmsView view = new hrmsView(HRMSModel);
                            ^
  symbol:   class hrmsView
  location: class HRMS
4 errors
=======================================

Would really appreciate if you could tell me what I was doing wrongly here...Thanks in advance! I've added the code for the main package of my class hrms MVC gui below, for your reference.

dizzyone
  • 43
  • 7

4 Answers4

0

hrmsModel HRMSModel = new hrmsModel(); seems like its not arrange properly.

I think the right arrarangement is this YourClass yourVariable = new YourClass()

bumbumpaw
  • 2,522
  • 1
  • 24
  • 54
0

First, check if you have the classes hrmsModel and hrmsView in the same package as HRMS. If you don't have them, you should import them.

On a side note, it's best if you follow the Java naming convention and name your class HRMSModel and your variable hrmsModel. If you are following that convention, then you might be confusing the order of both and that's why the compiler complains.

Mariano D'Ascanio
  • 1,202
  • 2
  • 16
  • 17
0

Syntax for object creation is:

ClassName instanceName = new ClassName();

So change this

hrmsModel HRMSModel = new hrmsModel();

to:

HRMSModel hrmsModel = new HRMSModel();
Juned Ahsan
  • 67,789
  • 12
  • 98
  • 136
0

Under hrms package you have HRMS* java, but you are trying to create object for hrms* classes.

Change name and execute.