Hello,
I have a problem a bit special, in fact not a real problem but rather a concern that I design because I love solving perfection. I have a class called 'vegetable' which contains a static method named 'getFoo ()' that returns an integer. I now creates a carrot and cabbage class that inherits from vegetable and method overloading 'getFoo' by returning different values each. I have a method in another class completely independent of the schematic revision named 'processFoo' here is the prototype:
Code:
public void processFoo (Vegetable vetg);
I'd like to access a static method of a class corresponding to an object instantiated. but it is not accessing it. If you have any solution for this then it would be great. Thanks in advance.
Bookmarks