11 2015 档案

String字符串反转
摘要:newStringBuffer("abcde").reverse().toString();通过char数组进行转换 1 package com.test.reverse; 2 3 public class TestReverse { 4 public static void main(S... 阅读全文

posted @ 2015-11-18 23:37 Holyz 阅读(1632) 评论(0) 推荐(0) 编辑

保留小数点后任意位数
摘要:1 package com.test.math; 2 3 import java.math.BigDecimal; 4 import java.math.RoundingMode; 5 6 public class sss { 7 public static void main(String[] a 阅读全文

posted @ 2015-11-18 22:45 Holyz 阅读(184) 评论(0) 推荐(0) 编辑

JAVA 日期加减
摘要:用java.util.Calender来实现 Calendar calendar=Calendar.getInstance(); calendar.setTime(new Date()); System.out.println(calendar.get(Calendar.DAY_OF_MONT... 阅读全文

posted @ 2015-11-18 22:38 Holyz 阅读(431) 评论(0) 推荐(0) 编辑

调用WebService接口返回字符串
摘要:1 Service service = new Service(); 2 Call call = (Call) service.createCall(); 3 call.setTargetEndpointAddress(this.endPoint);... 阅读全文

posted @ 2015-11-18 22:31 Holyz 阅读(2620) 评论(0) 推荐(0) 编辑

IO流大文件拷贝
摘要:1packagecom.test.io;23importjava.io.BufferedInputStream;4importjava.io.BufferedOutputStream;5importjava.io.File;6importjava.io.FileInputStream;7import... 阅读全文

posted @ 2015-11-18 22:22 Holyz 阅读(234) 评论(0) 推荐(0) 编辑

Map遍历效率 : entrySet > keySet
摘要:1//entrySet()2for(Entryentry:map.entrySet()){3Stringkey=entry.getKey();4Stringvalue=entry.getValue();5System.out.println(key+":"+value);6}78//上下对比910/... 阅读全文

posted @ 2015-11-18 22:18 Holyz 阅读(272) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示