Revathy Balajee wrote:Lets Assume I have two classes Class A and Class B, When I compile both the classes Class A i get compile time error but not for Class B why is that can some one please explain?
When the Java compiler needs to disambiguate between two possible methods, it uses the "most specific method" rule. And in the case of class A, the rule fails to work, and hence, you get a compile error.
For more details, please search for "most specific method" on the ranch forums. Thanks.
Henry