可以为 long、int、short、char 或 byte 类型的值指定范围。 通过指定下限 from(包含)和上限 to(包含)来定义范围。
long
int
short
char
byte
from
to