what will be the answer of 4%5 in java
Answers
Answered by
0
The answer of 4%5 in Java will be 4
This is because here MOD function is used to return the last digit.. so may it be any figured number it will return you the digit.. if it had been 4/5 then the answer would have been zero because 4/5= 0.8 and as this is int u will get the answer 0
Hope it helps you
This is because here MOD function is used to return the last digit.. so may it be any figured number it will return you the digit.. if it had been 4/5 then the answer would have been zero because 4/5= 0.8 and as this is int u will get the answer 0
Hope it helps you
Similar questions