会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
L1998
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
···
10
下一页
2021年4月3日
Future
摘要: 1. cancel(boolean mayInterruptIfRunning)和isCancelled() 1 package Five_cancel_and_isCancelled; 2 3 import java.util.concurrent.Callable; 4 5 public cla
阅读全文
posted @ 2021-04-03 11:31 L1998
阅读(87)
评论(0)
推荐(0)
2021年4月1日
Executor与TreadPoolExecutor
摘要: 1.allowsCoreThreadTimeOut()方法 没有任务时,将线程池中的线程停掉。并且这个方法是允许线程数低于corePoolSize时,线程也因为空闲而终止。 1 package Four_allowsCoreThreadTimeOut_demo; 2 3 public class M
阅读全文
posted @ 2021-04-01 20:59 L1998
阅读(78)
评论(0)
推荐(0)
2021年3月29日
AVL树
摘要: 1 package AVLTree2; 2 3 public class AVLTreeDemo { 4 5 public static void main(String[] args) { 6 AVLTree t = new AVLTree(); 7 8 t.insert(4); 9 t.inse
阅读全文
posted @ 2021-03-29 17:36 L1998
阅读(37)
评论(0)
推荐(0)
2021年3月28日
Phaser
摘要: 1.arriveAndAwaitAdvance()方法 1 package Three_Phaser_arriveAndDeregister; 2 3 import java.util.concurrent.Phaser; 4 5 public class Service { 6 7 Phaser
阅读全文
posted @ 2021-03-28 14:57 L1998
阅读(128)
评论(0)
推荐(0)
2021年3月10日
树
摘要: 1.为什么需要树这种数据结构 1.1 数组存储方式分析 ArrayList底层数组扩容方法: 2.树 2.2 二叉树 如果用二叉树来存储数据,那么对数据的增删改查的效率都可以得到保障。 2.2.1 二叉树的概念 2.2.2 二叉树的遍历 (1)前序遍历 a. 先输出当前节点(初始的时候是root节点
阅读全文
posted @ 2021-03-10 13:58 L1998
阅读(51)
评论(0)
推荐(0)
2021年3月9日
哈希表
摘要: 1.一个实际需求问题 2.哈希表的基本介绍 3.哈希表提出背景 在java和数据库中间设置缓存层,可以将当下需要进行频繁操作的数据放入缓存层,减小对数据库频繁访问的压力。缓存层可以设置多级 4.功能实现 5.代码 (1)head中不存储数据,只存下一节点地址 1 package HashTable;
阅读全文
posted @ 2021-03-09 11:03 L1998
阅读(121)
评论(0)
推荐(0)
2021年3月8日
查找算法
摘要: 常用查找算法 1.顺序(线性)查找 逐一进行比对查找 2.二分查找/折半查找 2.1代码 (1)使用递归 1 package ChaZhao; 2 /* 3 * 二分法查找:前提是数组为有序数组 4 * 没有重复数字 5 * 使用递归 6 */ 7 public class ErFenSearch
阅读全文
posted @ 2021-03-08 16:29 L1998
阅读(572)
评论(0)
推荐(0)
2021年3月4日
排序算法
摘要: 1.冒泡排序 1 package PaiXu; 2 /* 3 * 每一趟比较,把最大的数沉下去 4 */ 5 public class MaoPaoDemo2 { 6 7 public static void main(String[] args){ 8 int a[]={1,3,5,7,8,6,2
阅读全文
posted @ 2021-03-04 12:49 L1998
阅读(73)
评论(0)
推荐(0)
2021年3月2日
回溯算法--8皇后问题(用4*4方便看步骤)
摘要: 1 package DiGui; 2 3 import java.lang.reflect.Array; 4 5 /* 6 * 利用递归实现8皇后问题 7 */ 8 public class EightQueen { 9 10 11 int max=4; 12 int []array=new int
阅读全文
posted @ 2021-03-02 13:05 L1998
阅读(125)
评论(0)
推荐(0)
2021年2月26日
栈
摘要: 1.用栈实现综合计算器(中缀) 1 package Zhan; 2 3 import java.util.Scanner; 4 5 public class ComprehensiveCalculatorDemo { 6 public static void main(String[] args){
阅读全文
posted @ 2021-02-26 01:04 L1998
阅读(61)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
10
下一页
公告