Optional概述 Optional 是个容器:它可以保存类型T的value,或者仅仅保存null。Optional提供很多有用的方法,这样我们就不用显式进行空值检测,很好地解决了空指针异常处理的问题,比如可以使用isPresent()方法判断value是否为null,使用get()方法获取val ...
分类:
编程语言 时间:
2021-01-06 12:35:08
阅读次数:
0
ODBCDataset ds = statement.query(); ReturnIfNotFmt1(!ds.null(), "%s", (const char *)statement.getErrorInfo(), checkError(statement.getState(), stateme ...
分类:
数据库 时间:
2021-01-06 12:25:53
阅读次数:
0
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO; using System.Li ...
JAVA: class WordDictionary { private Node head; /** * Initialize your data structure here. */ public WordDictionary() { this.head = new Node(null); } ...
分类:
其他好文 时间:
2021-01-06 12:18:38
阅读次数:
0
1.构造数据 为了操作方便, 先构造以下数据 1.1 学生表 create table `student` ( `id` int unsigned primary key auto_increment, `name` char(32) not null unique, `sex` enum('男', ...
分类:
数据库 时间:
2021-01-06 12:13:37
阅读次数:
0
在使用Swagger2.9的过程中,出现Illegal DefaultValue null for parameter type integer 在网上查找了解决办法,说是空字符串转换integer异常,需要在相应的integer字段加上@ApiModelProperty注解,然后加上属性 exam ...
分类:
编程语言 时间:
2021-01-05 11:43:20
阅读次数:
0
144. 二叉树的前序遍历 地址:https://leetcode-cn.com/problems/binary-tree-preorder-traversal/ //给你二叉树的根节点 root ,返回它节点值的 前序 遍历。 // // // // 示例 1: // // //输入:root = ...
分类:
其他好文 时间:
2021-01-05 11:30:49
阅读次数:
0
剑指 Offer 28. 对称的二叉树 class Solution { public boolean isSymmetric(TreeNode root) { if(root == null) return true; return Just(root.left,root.right); } pu ...
分类:
其他好文 时间:
2021-01-05 11:27:06
阅读次数:
0
1.强引用(Reference):默认使用的就是强引用,不会被GC,即使报OOM也不会被GC Object o = new Object();//默认就是强引用,一般使用这种 2.软引用(SoftReference):当内存不够时,才能被GC回收,内存足够是不会被回收 3.弱引用(WeakRefer ...
分类:
其他好文 时间:
2021-01-05 11:09:07
阅读次数:
0
var hiddenProperty = 'hidden' in document ? 'hidden' : 'webkitHidden' in document ? 'webkitHidden' : 'mozHidden' in document ? 'mozHidden' : null; doc ...
分类:
微信 时间:
2021-01-05 10:54:17
阅读次数:
0