• Post Reply Bookmark Topic Watch Topic
  • New Topic

Abstract classes and overloading methods .. getting errors please help!!  RSS feed

 
Divya Kotamraju
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everyone,

I have put all my .java files in the same folder.

I am trying to overload a method and pass the required parameters in a different class and am getting following error when trying to compile my EmployeeFormat.java file

My Code:

//Person.java



// Employee.java



//Code for GenericFormat.java


// Code for EmployeeFormat.java



Can anyone please let me know what is my mistake ?? Why am I getting an error when trying to compile the EmployeeFormat.java file?? Any help is appreciated.

Thank you!!
 
Mohamed Sanaulla
Bartender
Posts: 3184
34
Google App Engine Java Ruby
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Compiler error clearly states what's going wrong. Did you try to find out what the compiler states? Please check the formatObj() function signature in GenericFormat class and the one you are trying to invoke in EmployeeFormat class.
 
Alex Armenteros
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are passing the parameters to the function incorrectly.

Also when referring to a static data put the class name before: EmployeeFormar.emplTypeWidth1

 
Divya Kotamraju
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Alex and Mohammed . I could figure out my mistake and it is running fine now.

Thank you once Again!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!