Skip to main content
InterviewHubPRO
Section Overview
Q18

Question 18 of 50

Part 2: Object-Oriented Design, Code Smells & Refactoring (11 - 24)

36%
SOLID & OOP Principles (50 Qs)•Part 2: Object-Oriented Design, Code Smells & Refactoring (11 - 24)

What is Feature Envy and how do you resolve it?

junior Levelsolid-principlesObject-Oriented Design

In Simple Words: Occurs when a method in class A accesses getters of class B more than its own data. Resolve by moving the method into class B where the data naturally lives.