The modulus thing can be used in many different ways. You can generally do it other ways (though it may not be as intuitive or easy). ie, if you want to see if something is even or odd.
Using the mod operator
Code:
int x = 193586
if(x % 2 == 0)
System.out.println("Even");
else
System.out.println("Odd");
You could also create a recursive method that would determine.
(I just came up with this off the top of my head so it might not work quite right).
Code:
public boolean even(int num, int current) {
if(current > num)
return false;
else if(current == num)
return true;
else return even(num, current * 2);
}
System.out.println(even(193586, 2));
While you can certainly do things differently, it is generally easier to use the modulus operator.