1.

What do we mean by stateless logic? Give an example.

Answer»
  • STATELESS logic - takes a CERTAIN INPUT value and just returns the expected result. It deals with stateless data whose value is not CHANGING over time. We are not considering the previous value of the data but the current one only.  
  • Many libraries are used in every programming language, for example, the date formatting library. This library, whatever value you passed to it, will give you a date format that is always the same. 

GENERALLY stateless logic does not involve a record of previous interactions and every interaction request has to be handled based on new information (that comes with the request). 



Discussion

No Comment Found

Related InterviewSolutions