摘要: 今天尝试用idea连接MySQL数据库,测试连接时报错 Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezone’ property manually. 根据字面意思是时区方面的错误,百度后在url后加 阅读全文
posted @ 2020-05-24 17:49 ZuiTaiPing 阅读(4) 评论(0) 推荐(0)
摘要: 使用前提 使用Lambda必须具有接口,且要求接口中有且仅有一个抽象方法。 只有当接口中的抽象方法存在且唯一时,才可以使用Lambda。使用Lambda必须具有上下文推断。 即方法的参数或局部变量类型必须为Lambda对应的接口类型,才能使用Lambda作为该接口的实例。 格式 (参数类型 参数名称 阅读全文
posted @ 2020-04-08 21:55 ZuiTaiPing 阅读(30) 评论(0) 推荐(0)
摘要: System类中的 currentTimeMillis()方法 public static long currentTimeMillis() :返回以毫秒为单位的当前时间。 public class SystemDemo { public static void main(String[] args 阅读全文
posted @ 2020-03-08 16:53 ZuiTaiPing 阅读(27) 评论(0) 推荐(0)
摘要: 在java类中直接调用方法会报错 我所知道原因: Java 类定义写在一对花括号内。 类定义花括号内的内容仅能包括, 声明 属性、方法, 以及 静态代码块 。 调用某一个方法的代码,必须写在某一个方法体或静态代码块内。 阅读全文
posted @ 2020-03-03 17:28 ZuiTaiPing 阅读(17) 评论(0) 推荐(0)
摘要: select to_char(Sysdate,'yyyy-mm-dd HH24:MI:SS') from dual; --当前时间 select to_char(Sysdate+1,'yyyy-mm-dd HH24:MI:SS') from dual --当前时间加1天 select to_char 阅读全文
posted @ 2020-01-06 14:12 ZuiTaiPing 阅读(46) 评论(0) 推荐(0)
摘要: 一. 查询给定时间在开始时间列与结束时间列范围中数据; select * from t 表名 where t.日期列 >= to_date('20xx-xx-xx 00:00:00','yyyy-mm-dd hh24:mi:ss') and t.日期列 <= to_date('20xx-xx-xx 阅读全文
posted @ 2019-12-18 17:24 ZuiTaiPing 阅读(258) 评论(0) 推荐(0)