- Hands-On Object:Oriented Programming with C#
- Raihan Taher
- 99字
- 2021-07-02 12:44:34
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.
推薦閱讀
- Objective-C Memory Management Essentials
- Python自然語言處理實(shí)戰(zhàn):核心技術(shù)與算法
- Java程序員面試算法寶典
- C語言程序設(shè)計(jì)案例精粹
- 零基礎(chǔ)學(xué)單片機(jī)C語言程序設(shè)計(jì)
- 51單片機(jī)C語言開發(fā)教程
- OpenGL Data Visualization Cookbook
- Android項(xiàng)目實(shí)戰(zhàn):手機(jī)安全衛(wèi)士開發(fā)案例解析
- Spring Security Essentials
- Xcode 6 Essentials
- FPGA嵌入式項(xiàng)目開發(fā)實(shí)戰(zhàn)
- 創(chuàng)意UI Photoshop玩轉(zhuǎn)移動(dòng)UI設(shè)計(jì)
- Java EE 7 with GlassFish 4 Application Server
- 精通Spring:Java Web開發(fā)與Spring Boot高級功能
- ASP.NET開發(fā)寶典