Can any 1 provide me with an example of a program in Java of impure methods
Answers
Answered by
1
int a=5;b=6;c=7;
int a=5;b=6;c=7;{
int a=5;b=6;c=7;{ float sum a+b+c
int a=5;b=6;c=7;{ float sum a+b+c}
int a=5;b=6;c=7;{ float sum a+b+c}in this java program many impure methods are there.
plz mark as the brainlist answer and follow me
Answered by
0
Answer:
Example of program in Java of impure methods
Explanation:
function impureFunc(value){
return Math.random() * value;
}
var impureoutput = [];
for(var i = 0; i < 5; i++){
impureoutput.push(impureFunc(5));
}
console.log("Impure result: " + impureoutput); // result is inconsistent however input is same.
Similar questions