If your mom said "Go clean your room" and your dad said "go clean your room", do you have to clean your room twice? If you only clean your room once, how does someone know if you did it for your mom or for your dad?
The truth is - it doesn't matter, because doing it once satisfies both parent's requirements - and it's the same here in java and interfaces..
when you say
You're simply saying "I promise that the code I write below will satisfy the requirements of both ViewActions and DataActions." As soon as you write the "public int testData()" method, you have satisfied that part of the requirements for each interface (there could be others, although there is not in your example).
now, IF the two methods with the same name need to to fundamentally different things, you have a design issue.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Joined: Nov 23, 2010
Awesome reply fred . I liked the way you explained with the example "Go clean your room" .