Srini B

Greenhorn
+ Follow
since Jun 22, 2000
Merit badge: grant badges
For More
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 Srini B

Hi !
I have a small code on same lines but it is working fine.
Here it is!
==============
class BQuestion
{
public void Bmethod(int i) {
System.out.println(i) ;
}
}

public class AQuestion extends BQuestion {
public void Bmethod(double d) {
System.out.println("Overridden"+d) ;
}
public static void main(String args[]) {
AQuestion aobj = new AQuestion() ;
aobj.Bmethod(20.00) ;
}
}
=============
Output :
Overridden20.0
Correct me if I missed your question !!!

Hi!
The methods in an interface are public by default.
Now you are making the implementing the method as 'friendly', so you are restrictiong the access of the method.
Make the method 'public' in the implemented class, it will work.
Good Luck

[This message has been edited by Srini B (edited July 06, 2000).]