- 浏览: 6055 次
- 性别:
- 来自: 苏州
最新评论
文章列表
java多线程交替打印ABC
- 博客分类:
- myblog
public class ABC2 {
private static Lock lock = new ReentrantLock();
private static int count = 0;
private static Condition A = lock.newCondition();
private static Condition B = lock.newCondition();
private static Condition C = lock.newCondition();
public static class A implem ...
求数组中两个数和为10的数字组
- 博客分类:
- myblog
public static void main(String[] args) {
Integer[] aaa=new Integer[]{1,2,3,4,5,6,7,8,9,5,6,3,4,2,6,5};
ArrayList<Integer> arr=new ArrayList<>();
for(int i=0;i<aaa.length-1;i++){
for(int j=1;j<aaa.length;j++){
if(aaa[i]+aaa[j]==10&&!arr.contains(aaa[i])&& ...
/**
* 基于数组实现的顺序栈
* @param <E>
*/
public class Stack<E> {
private Object[] data = null;
private int maxSize=0; //栈容量
private int top =-1; //栈顶指针
/**
* 构造函数:根据给定的size初始化栈
*/
Stack(){
this(10); //默认栈大小为10
}
Stack(int initialSize ...
java实现前序中序后序
- 博客分类:
- myblog
public class Node {
private int data;
private Node leftNode;
private Node rightNode;
public Node(int data, Node leftNode, Node rightNode){
this.data = data;
this.leftNode = leftNode;
this.rightNode = rightNo ...
java实现快速排序
- 博客分类:
- myblog
package com.jzg.carsource.api.biz;
/**
* Created by JZG on 2017/8/25.
*/
public class QuickSortTest {
public static void sort(int[] arr,int left,int right){
int pivot;
if(left<right){
pivot=partition(arr,left,right);
sort(arr,left,pivot-1);
...
public class ReserveList {
public static NodeTest reserve(NodeTest node){
if(node.next==null){
return node;
}
NodeTest next=node.next;
node.next=null;
NodeTest re=reserve(next);
next.next=node;
return re;
}
public stati ...
public class ThreadSafeSingleTon {
private static ThreadSafeSingleTon instance=null;
private ThreadSafeSingleTon(){}
public static ThreadSafeSingleTon getInstance(){
if(instance==null){
synchronized (ThreadSafeSingleTon.class){
if(instance==null){
...
2018.09.21 北京爱康鼎科技
没笔试,两个技术人面试,问了一些问题,数据库,java,框架,redis,
没做题,
感觉一般,希望不大
问题收集:
1.spring mvc 流程
2.mysql如何同步到redis
3.红黑树
4.mysql 生成主键有哪几种方式
5.springboot如何整合mybatis
6.springcloud是否用过
7.spring 中用到了哪些设计模式
代理模式,单例模式,工厂模式,策略模式,原型模式,观察者模式
8.hashmap原理
9.jdk1.8新特性
10.mybatis是如何拼接成分页sql的
2018.09.26 美菜网
有笔试,一个人 ...