复制代码
- //:Literals.java
- classLiterals{
- charc=0xffff;//maxcharhexvalue
- byteb=0x7f;//maxbytehexvalue
- shorts=0x7fff;//maxshorthexvalue
- inti1=0x2f;//Hexadecimal(lowercase)
- inti2=0X2F;//Hexadecimal(uppercase)
- inti3=0177;//Octal(leadingzero)
- //HexandOctalsoworkwithlong.
- longn1=200L;//longsuffix
- longn2=200l;//longsuffix
- longn3=200;
- //!longl6(200);//notallowed
- floatf1=1;
- floatf2=1F;//floatsuffix
- floatf3=1f;//floatsuffix
- floatf4=1e-45f;//10tothepower
- floatf5=1e+9f;//floatsuffix
- doubled1=1d;//doublesuffix
- doubled2=1D;//doublesuffix
- doubled3=47e47d;//10tothepower
- }///:~
欢迎光临 仓酷云 (http://www.ckuyun.com/) | Powered by Discuz! X3.2 |