官术网_书友最值得收藏!

Integer

An integer is a number that can have a plus (+) or minus (-) sign as a prefix, but this is optional. If no sign is given, it is considered as positive. You can define numeric literals in int, long, or hexadecimal form:

int numberInDec = -16;
int numberInHex = -0x10;
long numberinLong = 200L;

You can see that the first literal, -16, is a literal that's been specified in an integer variable, while the same value is assigned to an integer using a hexadecimal literal. The long variable is assigned a value with an L suffix.

主站蜘蛛池模板: 青铜峡市| 鹤岗市| 旌德县| 瑞金市| 思茅市| 菏泽市| 洛浦县| 绥宁县| 辽源市| 肥城市| 错那县| 麻栗坡县| 东兰县| 大名县| 郑州市| 南丰县| 凤凰县| 安塞县| 大化| 安平县| 平和县| 松溪县| 翼城县| 张家口市| 滦平县| 酉阳| 那坡县| 九江县| 宝应县| 翁牛特旗| 黔南| 揭东县| 盖州市| 新巴尔虎左旗| 盘锦市| 丹寨县| 平邑县| 泉州市| 巴彦淖尔市| 吉林省| 铅山县|