How do I find the modulo (%) of two long values in Java? My code says \'Integer number too large\' followed by the number I\'m trying to mod. I tried casting it to a long bu
The % operator does work for longs. It sounds like you may have forgotten to stick L at the end of a numeric literal, as in 123456789L. Can we see your code?