1.Mah.ceil()
* Returns the smallest (closest to negative infinity)
* {@code double} value that is greater than or equal to the
* argument and is equal to a mathematical integer. Special cases:
* If the argument value is already equal to a
* mathematical integer, then the result is the same as the
* argument.If the argument is NaN or an infinity or
* positive zero or negative zero, then the result is the same as
* the argument. If the argument value is less than zero but
* greater than -1.0, then the result is negative zero.Note
* that the value of {@code Math.ceil(x)} is exactly the
* value of {@code -Math.floor(-x)}.
2.i= i ++;
3.
Integer a =5;
Long b = 5L;
Double c = 5.0;
System.out.print(a.equals(b));
System.out.print(a==c);
byte d = (byte) 128;
byte e = 128;// error
4.Java一律采用Unicode编码方式,每个字符无论中文还是英文字符都占用2个字节。
将字符串S以其自身编码方式分解为字节数组,再将字节数组以你想要输出的编码方式重新编码为字符串。
例:String newUTF8Str = new String(oldGBKStr.getBytes("GBK"), "UTF8");
Java虚拟机中通常使用UTF-16的方式保存一个字符
ResourceBundle能够依据Local的不同,选择性的读取与Local对应后缀的properties文件,以达到国际化的目的。
时间: 2024-12-22 13:54:54