donaldth smithts wrote:if i have food class and pie class which inherits food
Food and Pie. By convention, Java
class names start with uppercase letters.
"I have." By the rules of English grammar, the personal pronoun "I" is always capitalized. If you UseRealWords
(⇐click) it makes it easier to read and understand your question.
i know that both are reference variable of pie,
No. The "x" variable is of type reference-to-Pie, and the "y" variable is of type reference-to-Food.
what is the difference between the two regarding method accsess in both classes
What do you mean?