09 2013 档案
摘要:java中的四舍五入,功能很简单,写的时候一般都没有注意到过,今天发现java有自己的方法格式化字符串DecimalFormat df =new DecimalFormat("##0.00");加上两个“##”为四舍五入,如果去掉“#”为五舍六入保留小数点后两位df.format(float d);
阅读全文
摘要:static int[] insertion_sort(int[] unsorted) { //默认从第二个开始,默认第一个是有序的 for (int i = 1; i unsorted[i]) { //设...
阅读全文
摘要:@RequestMapping("/down") public void down(HttpServletRequest request, HttpServletResponse response) throws Exception { String messag...
阅读全文
摘要: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...
阅读全文
摘要:package com.test.java;public class Test { public static void getService(ServiceFactory sf){ Service s = sf.getService(); s.method1();...
阅读全文
浙公网安备 33010602011771号