java
文章平均质量分 61
长安过客君
这个作者很懒,什么都没留下…
展开
-
mysql错误:java.sql.SQLException: The server time zone value ‘XXXX‘ is unrecognized or represents...
错误信息 java web 项目,控制台server异常信息如下 java.sql.SQLException: The server time zone value '?й???????' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to原创 2021-02-04 16:10:27 · 355 阅读 · 1 评论 -
JAVA基础知识点总结
集合 Set 接口 1、java中什么时候需要重写equals和hashCode方法,以及为什么重写? /*因为Object中默认的equals方法,内部还是使用==来比较对象在内存中的地址,所以结果位false*/ /*如果重写了equals方法,那么如果两个对象的属性值相同,那么程序会在第三步判断中返回true, * hashCode()方法,它是一个本地方法,底层是运用对象的内存地址通过哈希函数来计算的。 * 问题:为什么重写equals时,一定需要重写hashCode()方法? * 因为重写了equ原创 2020-12-10 16:17:24 · 113 阅读 · 0 评论