Hello Yu:
After reading what you mentioned, I think your question is not about overload, it may be override.When one class has methods which have same name and different types of arguments, like:
public int method(){};
private double method (
int x){};
The question you mentioned can be separate into 2 parts variable and method();
Variale:
Without considering the static or instance variables,when you call the variable, it depends on the type.It means if the code is A a = new B(); when you call a.x or a.y, it will show the class A's variable value.
Method():
1.It is different in static and instance method().First, The static method() can't override instance method() and instance method() can't override static method.
2.If the subclass and it's superclass have same static method();when you call the method();it depends on type like variable(This situation may be called Hide).
3.If the subclass and it's superclass have same instance method();when you call the method();it depends on type like object.It means if the code is A a = new B(); when you call a.x(), it will execute the class B's method().Thos situation may be called override.
Conclude( s = static i = instance)
Please tolerat my poor English, and hope it can help you !
[ December 28, 2003: Message edited by: Chao Chihwai ]