//大家可根据自己需求调用里面的方法 转发 //必导入架包 需要可找http://four.haser.top/ package com.hr.util; import java.io.IOException;import java.io.InputStream;import java.util.H ...
分类:
编程语言 时间:
2021-01-08 10:32:02
阅读次数:
0
一、工厂模式在 JDK-Calendar 应用的源码分析 测试代码: 1 public class Factory { 2 3 public static void main(String[] args) { 4 // getInstance 是 Calendar 静态方法 5 Calendar c ...
分类:
其他好文 时间:
2021-01-07 12:46:05
阅读次数:
0
下面是算法实现代码: package com.atguigu.sparsearray; public class SparseArray { public static void main(String[] args) { // 创建一个原始的二维数组 11 * 11 // 0: 表示没有棋子, 1 ...
分类:
编程语言 时间:
2021-01-07 12:34:39
阅读次数:
0
获取程序地址或路径 Web地址: JS: var baseUrl = window.location.host;//不带http:// 结果为: localhost:8033 asp.net: string host = HttpContext.Current.Request.Url.Host; s ...
分类:
其他好文 时间:
2021-01-07 12:20:42
阅读次数:
0
1.自定义响应结构 /** * 自定义响应结构 */ @Data public class Result { // 响应业务状态 private Integer code; // 响应消息 private String message; // 响应中的数据 private Object data; ...
分类:
编程语言 时间:
2021-01-07 12:12:55
阅读次数:
0
一、类加载器的类型 1、Bootstrap类加载器 最顶层的类加载器,它是由C++编写,主要负责JVM的核心类库的加载,例如java.lang包。 2、扩展类加载器 第二层类加载器,父加载器当然就是bootstrap,主要是加载jre\lb\ext子目录里面的类库。 3、系统类加载器 第三层类加载, ...
分类:
其他好文 时间:
2021-01-07 12:03:27
阅读次数:
0
获取一个整型随机数: 10-99 公式: [a,b] → (int)(Math.random() * (b - a + 1) +a) class RandomInt { public static void main(String[] args){ int value = (int)(Math.ra ...
分类:
编程语言 时间:
2021-01-07 11:59:44
阅读次数:
0
介绍 并查集是一种特殊的树结构,示例图如下 可以很方便的进行以下两种操作:以上图为例 判断元素6和元素4是否属于同一组, 合并元素6和元素4所在的组 代码实现 public interface UF { /** * 容量 */ int size(); /** * 是否已连接 */ boolean c ...
分类:
编程语言 时间:
2021-01-07 11:59:23
阅读次数:
0
Linux如果使用国内的源,当使用apt安装或更新某些应用时,会返回错误提示: GPG error: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B6 ...
统计单词频率 import java.util.*; public class test { public static void main(String[] args) { final String speech = "It was the best of times, it was the wo ...
分类:
其他好文 时间:
2021-01-06 12:31:58
阅读次数:
0