日常
球球的秋秋
这个作者很懒,什么都没留下…
展开
-
Comparable与Comparator
Comparable是排序接口。若一个类实现了Comparable接口,就意味着该类支持排序。实现了Comparable接口的类的对象的列表或数组可以通过Collections.sort或Arrays.sort进行自动排序。package java.lang;import java.util.*;public interface Comparable<T> { public int compareTo(T o);}ComparatorComparator是比较接口,我们如果原创 2020-08-09 10:48:41 · 167 阅读 · 0 评论 -
Array与Arrays
数组Array类Arrays类数组转字符串数组排序数组比较数组和ArrayList互转Array类Array是java.lang.reflect下的一个类,并且不能被new出来,也就是不能被实例化,它的构造器被private所修饰,且由于类被final修饰因此不能被继承,参考源码如下package java.lang.reflect; /** * The {@code Array} class provides static methods to dynamically create and原创 2020-08-09 10:41:19 · 193 阅读 · 0 评论 -
java注解
@Deprecated原创 2020-07-27 20:04:20 · 191 阅读 · 0 评论 -
json,jsonObject,jsonArray
这里写目录标题jsonObject源码jsonArrayjsonObject源码package org.json.simple;import java.io.IOException;import java.io.Writer;import java.util.HashMap;import java.util.Iterator;import java.util.Map;import java.util.Map.Entry;public class JSONObject extends H原创 2020-07-27 18:23:38 · 125 阅读 · 0 评论 -
com.typesafe.config.Config
com.typesafe.config.ConfigObject;com.typesafe.config.Config;1.在pom文件中引入依赖 <dependency> <groupId>com.typesafe</groupId> <artifactId>config</artifactId> <version>1.3.3</vers原创 2020-07-27 16:21:54 · 1249 阅读 · 0 评论 -
java合并int数组
public class array { public static void main(String[] args) { //声明数组1 String[] str1 = new String[]{"1","2"}; //声明数组2 String[] str2 = new String[]{"3","4"}; //目标数组 String[] str3 = new String[4];原创 2020-07-21 21:57:51 · 1536 阅读 · 1 评论 -
java数组转集合
List<Comparable> list= Arrays.asList(nums);数组变集合,需要注意的是:我们通过数组转换成的集合,不能对该集合做增删操作,因为数组的长度是固定的,所以不能对其做改变其结构的操作,增删就是对其的结构进行了改变,我们可以做get,contains等操作。基本的数据类型不能直接使用那为什么要转换成集合呢?要判断某个元素是否在数组中,就不用去遍历数据了,直接使用集合的Contains方法。...原创 2020-07-15 11:01:00 · 230 阅读 · 0 评论 -
集合工具类Collections
Collection和Collections的区别;Collection是集合的接口Collections操作集合的工具类import java.util.Collection;import java.util.Collections;7.15今天碰到了个叫shuffle() :随机排列指定的列表。(打乱列表元素顺序) List<Integer> list = new ArrayList<>(); list.add(6); list原创 2020-07-15 10:55:47 · 114 阅读 · 0 评论 -
刷题--剑指offer+leetcode--专题--树
主要是剑指offer的:剑指offer第二版+leetcode:indexindex_剑指offerdescriptionkey wordsdonedate对应leetcodedone17重建二叉树遍历,重建Y19-12-2105,106N28二叉树的下一个结点下一结点N19-12-3326树的子结构遍历,递归N...原创 2020-03-24 09:56:19 · 234 阅读 · 0 评论 -
安装布比区块链环境
今天安装布比的环境和看视频学习如何用他们的东西https://bumo-cn.readthedocs.io/zh/latest/docs/BUMO节点安装运维指南.html#macosbumohttp://www.bubifans.com/portal.php?mod=list&catid=12...原创 2019-01-10 17:02:34 · 619 阅读 · 1 评论