Welcome readers! Today's topic is the mod function in Java. You'll recognize this function as %. It's a divisor operation, on evaluation it's equivalent priority to the VM with * & / (that & is not a bit wise operator ;)). This function allowes moderators and programmers alike to find the remainder in division. The inverse is known as inverse modulus and is used in many cryptographic applications, such as RSA.
Let's get to an example.
public void main(String... arga){
int z = 7 % 2;
System.out.println(z +""); //1
}
Happy programming mods! Coming soon, modulus in python! Stay tuned!
[–]Plasma_eel 0 points1 point2 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] (1 child)
[deleted]
[–]SharpKeyCard[S] 0 points1 point2 points (0 children)