I am new to Java.Trying to learn myself. I have created 2 different classes (let me say class1 and class2)from which one class in inherited.I have created an object , set and get methods(like settotal(),getcode()) in class1. I inherited class in class2 . in class to i have given few other set and get methods. I even wrote toString method in class2 to call all the methods. I am able to call the methods only from class2 but not from class1. it is showing an error as cannot resolve symbol method getcode();
I wonder how to call the methods from class1 to class2. My main class is again a different class.
Could you post some example code that creates the error message you're getting?
When posting code, please be sure to surround the code with the [code] and [/code] UBB Tags. This will help to preserve the formatting of the code, thus making it easier to read and understand.