随笔分类 - Java
摘要:commons-cli 依赖: 1 <!-- https://mvnrepository.com/artifact/commons-cli/commons-cli --> 2 <dependency> 3 <groupId>commons-cli</groupId> 4 <artifactId>co
阅读全文
posted @ 2021-07-12 14:10
为你编程
摘要:1 import com.alibaba.fastjson.JSON; 2 import java.util.ArrayList; 3 import java.util.List; 4 import java.util.function.Consumer; 5 import java.util.st
阅读全文
posted @ 2020-07-24 16:36
为你编程
摘要:1 import java.util.function.Supplier; 2 3 public class UserSupplier { 4 5 public static void main(String[] args) { 6 7 /** 8 * Supplier是用来提供一个对象,至于提供的
阅读全文
posted @ 2020-07-24 16:30
为你编程
摘要:1 import java.util.Arrays; 2 import java.util.Comparator; 3 4 public class UserComparator { 5 6 public static void main(String[] args) { 7 8 /** 9 * C
阅读全文
posted @ 2020-07-24 16:21
为你编程
摘要:import java.util.function.Function; public class UserFunction { public static void main(String[] args) { /** * Function接口的主要作用是将一个给定的对象进行加工,然后返回加工后的对象
阅读全文
posted @ 2020-07-24 16:03
为你编程
摘要:1 /** 2 * Java 8引入了全新的Stream API。这里的Stream和I/O流不同,它更像具有Iterable的集合类,但行为和集合类又有所不同. 3 * Java里面定义Stream: 4 * A sequence of elements supporting sequential
阅读全文
posted @ 2020-07-24 15:52
为你编程
摘要:1 public class Person{ 2 private int age; 3 private String name; 4 public Person(int age, String name) { 5 this.age = age; 6 this.name = name; 7 } 8 p
阅读全文
posted @ 2020-07-24 15:42
为你编程
摘要:1 import lombok.AllArgsConstructor; 2 import lombok.Data; 3 import lombok.NoArgsConstructor; 4 5 @Data 6 @NoArgsConstructor 7 @AllArgsConstructor 8 pu
阅读全文
posted @ 2020-07-24 15:15
为你编程
摘要:1 import java.beans.BeanInfo; 2 import java.beans.IntrospectionException; 3 import java.beans.Introspector; 4 import java.beans.PropertyDescriptor; 5
阅读全文
posted @ 2018-10-10 18:38
为你编程
摘要:1 import java.math.BigDecimal; 2 import java.math.RoundingMode; 3 4 /** 5 * 精确计算工具类(加,减,乘,除,返回较大值,返回较小值) 6 */ 7 public class CalculationUtil { 8 9 /**
阅读全文
posted @ 2018-10-10 18:34
为你编程
摘要:1 import java.lang.reflect.Field; 2 import java.lang.reflect.Modifier; 3 import java.util.ArrayList; 4 import java.util.Collection; 5 import java.util
阅读全文
posted @ 2018-10-10 18:32
为你编程
摘要:1 import com.github.stuxuhai.jpinyin.ChineseHelper; 2 import com.github.stuxuhai.jpinyin.PinyinFormat; 3 import com.github.stuxuhai.jpinyin.PinyinHelp
阅读全文
posted @ 2018-10-10 18:32
为你编程
摘要:1 import java.io.FileOutputStream; 2 import java.io.IOException; 3 import java.io.OutputStream; 4 import java.io.UnsupportedEncodingException; 5 impor
阅读全文
posted @ 2018-10-10 18:26
为你编程
摘要:1 /** 2 * 加密类 3 */ 4 public class MD5Util { 5 /** 6 * 进行MD5加密 7 */ 8 public static String entryptByMD5(String originstr) { 9 String result = null; 10
阅读全文
posted @ 2018-10-10 18:21
为你编程
摘要:1 import org.apache.commons.configuration.ConfigurationException; 2 import org.apache.commons.configuration.PropertiesConfiguration; 3 4 import com.al
阅读全文
posted @ 2018-10-10 17:56
为你编程
摘要:1 import java.util.Random; 2 import java.util.concurrent.ThreadLocalRandom; 3 import org.apache.commons.lang3.RandomUtils; 4 import org.apache.commons
阅读全文
posted @ 2018-10-10 17:51
为你编程
摘要:1 import java.io.File; 2 import java.io.IOException; 3 import org.testng.annotations.DataProvider; 4 import org.testng.annotations.Test; 5 import jxl.
阅读全文
posted @ 2018-10-10 17:23
为你编程
摘要:1 import java.io.BufferedReader; 2 import java.io.FileInputStream; 3 import java.io.IOException; 4 import java.io.InputStreamReader; 5 import java.uti
阅读全文
posted @ 2018-10-10 17:21
为你编程
摘要://相关依赖 1 <!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload --> 2 <dependency> 3 <groupId>commons-fileupload</groupId> 4 <a
阅读全文
posted @ 2018-10-10 13:59
为你编程
摘要:<dependency> <groupId>com.google.zxing</groupId> <artifactId>core</artifactId> <version>3.3.0</version></dependency> <dependency> <groupId>com.google.
阅读全文
posted @ 2018-10-10 13:39
为你编程