![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
轰轰战队冒险者
这个作者很懒,什么都没留下…
展开
-
如何在nginx下部署vue 项目
vim /etc/nginx/nginx.conf server { root /home/xxxx/home/; location /home { try_files $uri $uri/ @router; index index.html; } lo...原创 2020-04-14 20:35:06 · 205 阅读 · 0 评论 -
一个JAVA的链表
public class ListNode { public int e; public ListNode next; private ListNode head; public ListNode(int e, ListNode next) { head = this; this.e = e; this.next = next; } public ListNod...原创 2020-02-14 18:28:41 · 147 阅读 · 0 评论 -
二分搜索树
package com.sun.refect; import java.util.LinkedList; import java.util.Queue; /** * @author sun 二分搜索樹 * @param <E> */ public class BST<E extends Comparable<E>> { private class ...原创 2019-12-30 14:13:33 · 73 阅读 · 0 评论 -
Java 链表删除某一元素
package com.linkedlist; public class ListNode { public int val; public ListNode next; public ListNode(int x) { val = x; } public ListNode(int[] arr){ ...原创 2019-11-26 15:16:26 · 507 阅读 · 0 评论 -
Java 链表
package com.linkedlist; public class LinkedList<E> { private class Node{ public E e; public Node next; public Node(E e,Node next){ this.e = e; this.next = next; } public ...原创 2019-11-25 15:41:42 · 66 阅读 · 0 评论 -
Java 线程安全发布对象
package com.singleton; /** * @author sun * 懒汉模式 * 非线程安全 */ public class SingletonExample { private SingletonExample(){ } private static SingletonExample instance = null; public static S...原创 2019-11-25 08:55:13 · 93 阅读 · 0 评论 -
Java 线程安全性
原子性 可见性 有序性 package com.atomic; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Semaphore...原创 2019-11-24 19:47:23 · 69 阅读 · 0 评论 -
Java 队列 循环队列
package com.queue; /** * 动态数组 * @param <E> */ public class Array<E> { private E[] data; private int size; // 构造函数,传入数组的容量capacity构造Array public Array(int capacity){ ...原创 2019-11-24 10:34:45 · 115 阅读 · 0 评论 -
Java 栈的实现
package com.stack; public class Array<E> { private E[] data; private int size; // 构造函数,传入数组的容量capacity构造Array public Array(int capacity){ data = (E[])new Object[capaci...原创 2019-11-23 17:33:36 · 119 阅读 · 0 评论 -
Android Handler的使用
package com.example.handler_01; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.os.Handler; import android.widget.TextView; public class MainActivity exte...原创 2019-11-20 11:22:33 · 139 阅读 · 0 评论 -
使用Java8的javascript引擎
import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader;import javax.script.Invocable; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import jav原创 2017-09-29 19:05:04 · 439 阅读 · 0 评论 -
因式分解
public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int number = sc.nextInt(); int n = 2; int Indexes = 0; while原创 2017-09-07 20:59:02 · 400 阅读 · 0 评论 -
struts2自定义类型转换器
前台jsp页面<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <%@ taglib uri="/struts-tags" prefix="s"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitiona原创 2017-07-02 22:12:46 · 166 阅读 · 0 评论 -
Java8函数式编程
package example;import java.awt.Event; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.EventListener; import java.util.function.BinaryOperator;import javax.swi原创 2017-07-02 17:16:27 · 323 阅读 · 1 评论 -
FlyWeight模式
public interface Shape { void draw(); } public class Circle implements Shape { private String color; private int x; private int y; private int radius; public Circle(String color)原创 2017-05-25 12:38:38 · 184 阅读 · 0 评论 -
Java工厂模式
定义一个创建对象的接口public interface Shape { void draw(); } 子类实现接口public class Rectangle implements Shape{ @Override public void draw() { System.out.println("Inside Rectangle :: Draw()");原创 2017-05-24 13:52:26 · 236 阅读 · 0 评论