...I know, If a method differs with arguments AND/OR return types, it is overloading...
Return type is not a part of method's signature.
Overloading method can have different return type.
Only arguments types and order are important.
...If yes, is it possible to overload staic method with instance method?...
The point here is to understand a big difference between overloading and overriding methods. Overloaded methods are completely independent from the compiler's point of view. The same name is just for programmer's fun. But compiler determine which method to call not by name only, but by method's
signature. This is method's name and argument types (order, count).
Argument names are not important - there's no more names when you make a method call. Return type is not important due to possible implicit type changes.
That is - if you have two mathods declarations:
int foo( int a, int b );
float foo( int a, int ? );
And late smth. like this:
double j = foo( 10, 15 );
No way to decide which one is to call 8(
So, yes, you can have to completely separated (from compiler's point of view) methods, and one of them is
static while another one is not.
[ June 15, 2002: Message edited by: Igor Romanov ]