![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
温_暖
无为,却想无所不为。
展开
-
数组与list相互转化
数组转listString[] array = { "1", "2, "3", "4", "5", "6", "7", "8" }; List<String> list = new ArrayList<String>(Arrays.asList(array)); int类型错误示例: //int类型的数组不能这么转化,放进去的是整个数组,而不是一个一个元素 int[] intArray = { 1原创 2017-01-06 14:31:33 · 344 阅读 · 0 评论 -
java取整
代码double i = 1.456;System.out.println("舍掉小数取整:Math.floor(1.456)=" + (int) Math.floor(i));System.out.println("四舍五入取整:(1.456)=" + new BigDecimal(i).setScale(0, BigDecimal.ROUND_HALF_UP));System.out.print转载 2017-01-07 17:17:08 · 303 阅读 · 0 评论 -
jsp自定义标签:body-content取值的含义
1.empty:空标记,即起始标记和结束标记之间没有内容。<l:hello /> <l:hello ></l:hello >2.scriptless:接受文本、EL和JSP动作,但不能含有脚本元素。<l:hello >This is message body</l:hello>3.JSP:体包含JSP元素,如EL表达式,标准或定制动作以及脚本元素。<l:hello > <%=request.getP原创 2017-05-14 17:45:35 · 2617 阅读 · 0 评论