09 2013 档案

摘要:java中的四舍五入,功能很简单,写的时候一般都没有注意到过,今天发现java有自己的方法格式化字符串DecimalFormat df =new DecimalFormat("##0.00");加上两个“##”为四舍五入,如果去掉“#”为五舍六入保留小数点后两位df.format(float d); 阅读全文
posted @ 2013-09-26 17:32 942391815 阅读(219) 评论(0) 推荐(0)
摘要:static int[] insertion_sort(int[] unsorted) { //默认从第二个开始,默认第一个是有序的 for (int i = 1; i unsorted[i]) { //设... 阅读全文
posted @ 2013-09-24 09:50 942391815 阅读(216) 评论(0) 推荐(0)
摘要:@RequestMapping("/down") public void down(HttpServletRequest request, HttpServletResponse response) throws Exception { String messag... 阅读全文
posted @ 2013-09-23 14:28 942391815 阅读(523) 评论(0) 推荐(1)
摘要:package com.test.inner;public class Test { public String i; public Test(String s){ this.i=s; } class Inner{ public String getI(){ return Test.this... 阅读全文
posted @ 2013-09-18 10:19 942391815 阅读(145) 评论(0) 推荐(0)
摘要:package com.test.java;public class Test { public static void getService(ServiceFactory sf){ Service s = sf.getService(); s.method1();... 阅读全文
posted @ 2013-09-15 19:29 942391815 阅读(125) 评论(0) 推荐(0)