what are pure and impure expressions in java
Share
what are pure and impure expressions in java
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Answer:
A pure function may not change the variable it's passed. An impure function does, so for example if you pass the variable x to the function int addOne(x);, add one could return x + 1, and not change x(pure), or addOne(x); could increment x by one, so the value of the variable x is now changed.
Hope this helps u ❤️
THNXX MY ANSWERS ❤️
Answer:
A pure expression contains the element of the same data type whereas an impure expression contains element of different data types.