Computer Science, asked by sanchana33, 7 months ago

what are pure and impure expressions in java​

Answers

Answered by Garvitgupta024
3

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 ❤️

Answered by anushkakonchada7
0

Answer:

A pure expression contains the element of the same data type whereas an impure expression contains element of different data types.

Similar questions