Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Poorvika Chandra

Greenhorn
+ Follow
since Jun 27, 2011
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Poorvika Chandra

Dear all,

As we know it is not recommended to write classes under default package.Then what might be the purpose behind the introduction of default packages in java

Regards
Poorvika
10 years ago
As of java static methods cannot be overriden.while doing a small example I encountered the following situation
class MySuperclass {
public static String step2() { return "Hi"; }
}
class MyClass extends MySuperclass {
private static void step2() { }
}
When I try to compile the above code it gave me the following error message "The return type is incompatible with MySuperclass.step2()".

My doubt here is when the static methods cannot be overriden ,then why compiler bothers about the return type incompatibility.
10 years ago