错误文档
Ix Zheng
小学生
展开
-
list.stream().forEach
People people1 = new People(1, "Ligs", true); People people2 = new People(2, "Songzx", false); People people3 = new People(3, "Jinzg", true); People people4 = new People(4, "Liuzx", false); People people5 = new Peopl...原创 2020-12-23 18:38:00 · 9451 阅读 · 2 评论 -
Iterator 方法 remove()、 hasNext()、next()
调用 it.next() 会返回迭代器的下一个元素,并且更新迭代器的状态。调用 it.hasNext() 用于检测集合中是否还有元素。调用 it.remove() 将迭代器返回的元素删除注意:remove对象是否存在,如果这个对象已被remove,再次remove会出现此异常Java.lang.IllegalStateException异常 People people1 = new People(1, "Ligs", true); People people2 = ne原创 2020-12-22 19:23:30 · 290 阅读 · 1 评论 -
Java startsWith() 方法
/** * startsWith() 方法用于检测字符串是否以指定的前缀开始。 */ String Str = "www.baidu.com"; System.out.print("返回值 :" ); System.out.println(Str.startsWith("www") ); System.out.print("返回值 :" ); System.out.pri...原创 2020-12-21 19:31:33 · 4184 阅读 · 0 评论 -
简单易懂List集合add()和addAll()的区别
直接上代码 List<Object> resultAdd = new ArrayList<>(); List<Object> resultAddAll = new ArrayList<>(); People people1 = new People(1, "Ligs", true); People people2 = new People(2, "Songzx", false);原创 2020-11-27 19:17:16 · 864 阅读 · 0 评论 -
简单易懂map遍历的几种方式
import java.util.*;public class MapFor { public static void main(String[] args) { Map<String,Double> map = new HashMap<String,Double>(); map.put("Ligs", 58D); map.put("Songzx", 1000D); map.put("Chisz", 100原创 2020-12-08 19:37:47 · 638 阅读 · 0 评论 -
Exception in thread “main“ java.lang.ClassNotFoundException解决方案
启动springboot项目出现以下错误Exception in thread "main" java.lang.ClassNotFoundException: com.ix.Application at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at org.sprin原创 2020-12-01 20:06:04 · 30664 阅读 · 7 评论 -
WARNING: IPv4 forwarding is disabled. Networking will not work解决方案
今天在运行mysql容器的时候出现以下错误首先修改配置文件echo "net.ipv4.ip_forward=1" >>/usr/lib/sysctl.d/00-system.conf重启docker和网络服务systemctl restart network && systemctl restart docker此时运行mysql容器,完美解决...原创 2020-11-29 11:57:32 · 620 阅读 · 0 评论 -
strm().filter().collect()和stream().map().collect()的作用
在看代码的时候看到了一下原创 2020-11-11 20:54:13 · 1013 阅读 · 2 评论 -
spring项目启动时,如何在控制台查看mybatis运行的sql语句
在mybatis配置文件添加信息<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE configurationPUBLIC "-//mybatis.org//DTD Config 3.0//EN""http://mybatis.org/dtd/mybatis-3-config.dtd"><configuration> <settings> <!-- 打印查询语句 --> <s原创 2020-11-21 09:54:23 · 1363 阅读 · 0 评论