what is the difference between pure and impor function in Java?
Answers
Answered by
2
Pure function or accessor returns the value from function to the caller about the state of an object.
Impure Function may or may not return a value.
Impure Function may or may not return a value.
RAHULSEN504:
i need minimum of 2 points
Answered by
1
Answer:
pure functions always returns the same result if the same arguments are passed and it is not depend on any state or data change during the program execution it must be only depend on its input arguments they don't have any side effects like network for database calls and do not modify the arguments which are passed to them.
impure functions that changes the internal state of one of its arguments for the value of some external variable is in impure function they may have any side effects like network a database calls and it may modify the arguments which are passed to them.
mark as brainliest please..
Similar questions