编程
jh108020
这个作者很懒,什么都没留下…
展开
-
网上遇到的面试题
题目:写一个方法,要求参数int类型,如:传入一个12345,返回结果54321。面试的时候遇到这个题,还有个要求,是方法体内的代码不能超过8行,而且还要用递归。[code="java"] public static void main(String[] args) { System.out.println(f(12345, 0)); } public sta...原创 2010-09-02 13:40:43 · 87 阅读 · 0 评论 -
java全部线程完成后再执行
[code="java"]import java.util.concurrent.CountDownLatch;public class Driver { // ... public static void main(String[] args) throws InterruptedException { int N = 10; CountDownLatch start...原创 2012-11-08 23:02:48 · 329 阅读 · 0 评论 -
(转) AOP的两种实现方式
原文:http://blog.chinaunix.net/uid-26884465-id-3350348.htmlAOP,面向切面编程,可以通过预编译方式和运行期动态代理实现在不修改源代码的情况下给程序动态统一添加功能的一种技术。 Aspect Oriented Programming(AOP),是目前软件开发中的一个热点,也是Spring框架中的一个重要内容。利用AOP可以对业...原创 2014-03-26 22:31:18 · 130 阅读 · 0 评论 -
java获取文件md5
[code="java"]public static String getFileMd5(File file) { FileInputStream in = null; try { in = new FileInputStream(file); byte[] arr = new byte[10240]; int len = 0; Messag...原创 2016-08-09 17:03:27 · 191 阅读 · 0 评论 -
jpa实体jackson问题
org.codehaus.jackson.map.JsonMappingException: No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer (to avoid...原创 2017-06-06 08:49:20 · 233 阅读 · 0 评论