🎴 Flashcard Mode
Java Programming
Card1 / 25
Mastered0
Review0
QuestionClick to flip
If m = -16 and n = -5 (m and n are int types), the result of the expression m%n is
AnswerClick to flip back
A
-1
💡 Explanation:
In Java, the remainder operator (%) follows the sign of the dividend. Since -16 divided by -5 is 3 with a remainder of -1, the result is -1.