java基础
lihe55966
这个作者很懒,什么都没留下…
展开
-
java四舍五入
舍掉小数取整:Math.floor(2.0)=2舍掉小数取整:Math.floor(2.1)=2舍掉小数取整:Math.floor(2.5)=2舍掉小数取整:Math.floor(2.9)=2舍掉小数取整:Math.floor(-2.0)=-2舍掉小数取整:Math.floor(-2.1)=-3舍掉小数取整:Math.floor(-2.5)=-3舍掉小数取整:Mat转载 2016-06-14 14:06:09 · 221 阅读 · 0 评论 -
map转list
public static void testMapVoid() { Map map = new HashMap(); map.put("a", "a1"); map.put("b", "b1"); map.put("c", "c1"); List listK原创 2016-05-26 13:45:18 · 239 阅读 · 0 评论 -
byte[],inputstream互转
private InputStream transformByte(byte[] b) throws Exception { if(null!=b && b.length > 0) { InputStream input = new ByteArrayInputStream(b);原创 2015-07-31 16:08:19 · 232 阅读 · 0 评论