12 2016 档案
摘要:表:user 列:id,name,age,createTime 1、找出表中最小年龄的用户: select min(age) from user ; select top 1 age from user order by age; select * from user where age<=all(
阅读全文
摘要:1 package com.noway.test.concurrent.cyclicBarrier; 2 3 import java.util.concurrent.BrokenBarrierException; 4 import java.util.concurrent.CyclicBarrier; 5 6 /** 7 * 多线程中如何'同时'启动多个线程 8 * @a...
阅读全文
摘要:1 package com.noway.test; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 import java.util.concurrent.Callable; 6 import java.util.concurrent.ExecutionException; 7 import java.util...
阅读全文
摘要:1 package com.noway.test; 2 3 import java.util.concurrent.Callable; 4 import java.util.concurrent.FutureTask; 5 6 /** 7 * FutureTask可以在需要获取线程的执行结果时使用,get()方法会阻塞移至等到线程执行完毕 8 * 比如多线程统计多个硬盘的...
阅读全文
摘要:1 package com.noway.test; 2 3 import java.lang.reflect.Field; 4 5 /** 6 * Integer的内部类IntegerCache作用 7 * @author Noway 8 * 9 */ 10 public class TestIntegerCache { 11 public static v...
阅读全文
摘要:对象之间的属性拷贝: org.springframework.beans.BeanUtils【spring-beans-4.1.4.RELEASE.jar】 org.apache.commons.beanutils.BeanUtilsBean【commons-beanutils-1.9.2.jar,
阅读全文
摘要:1 package com.noway.test; 2 3 import java.util.Timer; 4 import java.util.TimerTask; 5 6 /** 7 * 定时任务,每5s执行一次打印 8 * @author Noway 9 * 10 */ 11 public class TestTimer { 12 13 static...
阅读全文
浙公网安备 33010602011771号