Friday, February 18, 2011

Method overloading,overriding and static

public class Test {
public static void test() {
print();
}
public static void print() {
System.out.println("Test");
}
public void print() {
System.out.println("Another Test");
}
}
So this code will not work stating - duplicate method error.

No comments:

Post a Comment

Chitika