java通过下划线数字字面量增加可读性:10_00_00表示100000

用法

    int x1  = 2_014;     // Underscore in  deciaml format
int x2  = 2___014;   // Multiple consecutive underscores 
int x3  = 02_014;    // Underscore in  octal literal
int x4  = 0b0111_1011_0001;  // Underscore in binary literal
int x5  = 0x7_B_1;           // Underscores in hexadecimal literal 
byte b1 = 1_2_7;             // Underscores in decimal format 
double d1 = 2_014.01_11;     // Underscores in double literal

https://blog.csdn.net/qq_27789551/article/details/52014372
https://docs.oracle.com/javase/7/docs/technotes/guides/language/underscores-literals.html

上一篇:【C#语言规范版本5.0学习】2 词法结构(二、文本)


下一篇:自动驾驶 11-4: 优化状态估计 Optimizing State Estimation