I have code that when given a thing it needs to sort out what specific kind of thing it is and then take special actions based on that. The possible classes ...
Hi, Below is the code snippet. I want to call the func1() of class A in class C. if I use super.func1(), the class B method will be called. But I want to call func1() of class A. Can any one tell me how to call the func1() in class C in proper way. class A { public void func1() { ...
tvpavankumar, I can't get past the oxymorons in your question(s): 1. Need to restrict base classes method to be accessed by child class object. 2. I need that the "setValue" method should not be accessed by "ChildClass" object. So which is it? Protected? or not-children? I presume the restriction "Kindly don't change the access specifiers." is because you're implementing an interface ...