摘要: package com.fh.interview; /** * @author * @create 2018-05-27 下午4:40 **/ public class JMMTest { /** * 源代码--编译器指令重排序(编译器)--指令并行重排序(处理器)--内存指令重排序(处理器) * 阅读全文
posted @ 2018-05-27 18:01 默默行走 阅读(202) 评论(0) 推荐(0) 编辑
摘要: package com.fh.interview; /** * join测试 * * * sleep和wait方法的区别 * * 1、sleep()方法是Thread的静态方法,而wait是Object实例方法 2、wait()方法必须要在同步方法或者同步块中调用,也就是必须已经获得对象锁。 而sl 阅读全文
posted @ 2018-05-27 16:13 默默行走 阅读(108) 评论(0) 推荐(0) 编辑
摘要: package com.fh.interview; /** * 中断测试 * * @author * @create 2018-05-27 下午3:18 **/ public class InterruptDemo { public static void main(String[] args) { 阅读全文
posted @ 2018-05-27 15:26 默默行走 阅读(657) 评论(0) 推荐(0) 编辑
摘要: package com.fh.interview; import java.util.concurrent.*; /**线程创建的方式 * @author * @create 2018-05-27 下午2:58 **/ public class CreateTHread { public stati 阅读全文
posted @ 2018-05-27 15:10 默默行走 阅读(95) 评论(0) 推荐(0) 编辑
摘要: package com.fh.interview; /** * @author 死锁测试 * @create 2018-05-27 下午2:26 **/ public class DeadLockDemo { public static String resourceA = "A"; public 阅读全文
posted @ 2018-05-27 14:45 默默行走 阅读(362) 评论(0) 推荐(0) 编辑
摘要: /** * 基数排序 */ @Test public void RadioSort(){ int[] array = {123,345,5555,66666,764,12,33,455}; int maxLength = maxLength(array); int[] newArray = sort 阅读全文
posted @ 2018-05-27 13:52 默默行走 阅读(122) 评论(0) 推荐(0) 编辑
摘要: /** * 桶排序 */ @Test public void bucketSort(){ int[] array = {5,6,7,8,9,1,2,3,5,6,7,8,9}; buckerSort(array); System.out.println(Arrays.toString(array)); 阅读全文
posted @ 2018-05-27 11:35 默默行走 阅读(98) 评论(0) 推荐(0) 编辑