Refactoring of the code is a process in which the structure of the existing code is improved without changing the functional behavior of the code.

Purpose of refactoring the code:-

Refactoring of the code is essential while extending the code from iteration to iteration. If the code refactoring is not done, then the performance of the code deteriorate. This condition is called Software rot or code rot. As a result, the time and cost both are wasted.

BY Best Interview Question ON 10 Apr 2019