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

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.

主站蜘蛛池模板: 桃园市| 舟山市| 塔城市| 新宁县| 三江| 肥东县| 斗六市| 揭西县| 庐江县| 剑阁县| 东阳市| 丹寨县| 承德县| 深泽县| 化德县| 屏东市| 吴旗县| 海伦市| 威远县| 新巴尔虎左旗| 墨江| 东台市| 平度市| 阿坝县| 昌都县| 城固县| 镇雄县| 繁峙县| 武乡县| 左云县| 高雄市| 都江堰市| 江安县| 崇明县| 阿克| 盐边县| 东至县| 拉萨市| 黎川县| 运城市| 波密县|