![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
面试题
Evildoer Who
这个作者很懒,什么都没留下…
展开
-
String源码中equals具体实现
public boolean equals(Object anObject) { if (this == anObject) {//比较两个对象的地址 return true; } if (anObject instanceof String) {//判断该对象是否是String类型 String an...转载 2019-07-15 23:10:16 · 124 阅读 · 0 评论 -
根据父类id递归查询所有子节点
1. 创建数据库表CREATE TABLE `vrv_org_tab` ( `id` bigint(8) NOT NULL AUTO_INCREMENT, `org_name` varchar(50) NOT NULL, `org_level` int(4) NOT NULL, `org_parent_id` bigint(8) NOT NULL, PRIMARY KEY (...转载 2019-07-11 21:09:32 · 1294 阅读 · 1 评论 -
原生JDBC批量导入10万条数据
/** * 原生JDBC批量导入10万条数据 */public class Test01 { public static void main(String[] args) throws Exception { Class.forName("com.mysql.jdbc.Driver"); Connection connection = DriverMa...转载 2019-07-11 21:20:55 · 373 阅读 · 0 评论 -
左移运算和右移运算
左移运算2<<2; 求i的值? //结果等于左操作数乘上2的右操作数次方,于是结果是8 2*2²=8右移运算64>>2求值为多少//结果等于左操作数除以右操作数次方,结果为1664/(2²)=16...原创 2019-07-19 00:04:40 · 303 阅读 · 0 评论 -
JDK1.8字符串拼接的底层实现
public class A { public static void main(String[] args) { String a = "abc"; a = a + "d"; }} 编译器编译之后的等效代码public class A { public static void main(String[] args) { String a = "abc"; Strin...转载 2019-07-17 21:00:15 · 398 阅读 · 0 评论 -
mysql数据库索引失效
EXPLAIN select * from `user` where id =1;执行结果使用了or之后导致索引搜索失效EXPLAIN select * from `user` where id =1 or sex=0;执行结果原创 2019-07-18 00:00:32 · 84 阅读 · 0 评论 -
线程顺序执行
package com.pra;import java.util.concurrent.ExecutorService;import java.util.concurrent.Executors;/** * @author evi * @version 1.0.0 * @date 2019\8\15 22:00 */public class MewThread { ...原创 2019-08-15 22:38:57 · 107 阅读 · 0 评论 -
查询各班的前三名成绩
select s1.class,s1.`name`,s1.score from sc s1 where (SELECT COUNT(1) FROM sc s2 where s1.class=s2.class AND s2.score >= s1.score)<=3 GROUP BY s1.class,s1.score DESC;sc表查询结果转载 2019-08-16 21:05:18 · 554 阅读 · 0 评论