Junior — Middle
What violation occurs when merging multiple methods of different interfaces into one class or interface?
sobes.tech AI
Answer from AI
When combining multiple methods from different interfaces into a single class or interface, it can violate the Single Responsibility Principle (SRP). This results in a class or interface becoming too bulky and difficult to maintain.
Additionally, there may be conflicts in method names if different interfaces contain methods with the same names but different logic or signatures. This complicates implementation and can lead to errors.
In Android development, it is also important to consider that excessive merging of interfaces can reduce code readability and make testing more difficult.