Soumya Ranjan Padhi wrote:It is true that in java for multiple inheritance we use Interfaces. But are there any special programming scenarios that restricts us while implementing multiple inheritance through interfaces?
Don't quite understand the question, but the only "restriction" I can think of is implementing two or more interfaces with overlapping methods, where they don't all have the same meaning.
You cannot implement multiple inheritance in Java (or C#), whether you implement multiple interfaces or not. Methods implemented from an interface have to be written anew in their implementing classes, so you are really only mimicking multiple inheritance.
Collisions are problems, as Winston said, where
1: Several methods have the same signature but different return types: won’t compile, or,
2: Several methods in different interfaces have different intentions: design incompatibility.
If you look at these three methods, you will see their documentation has been very carefully written to avoid such incompatibilities: 123.