AP Computer Science A

study guides for every class

that actually explain what's on your next test

Number % 2 == 0

from class:

AP Computer Science A

Definition

The expression "number % 2 == 0" checks if a number is divisible by 2 without having any remainder. If there is no remainder (i.e., equal to zero), it evaluates to true; otherwise, it evaluates to false.

© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.