1.double数据类型,没有toString()方法。
2.String s = "asklj我";
s占了6个字节,字符串里中英文都是占一个字节。
3.Math.round(-11.5) = -11,Math.round(11.5) = 12.
正负数的四舍五入都是往大了偏。
4.产生1-3的随机数
(int) (Math.random() * 3 + 1)
1.double数据类型,没有toString()方法。
2.String s = "asklj我";
s占了6个字节,字符串里中英文都是占一个字节。
3.Math.round(-11.5) = -11,Math.round(11.5) = 12.
正负数的四舍五入都是往大了偏。
4.产生1-3的随机数
(int) (Math.random() * 3 + 1)