发布网友
共1个回答
热心网友
三种函数有以下用法。
curdate:1.curdate()2.current_date()3.current_date;default:1、在switch语句的时候使用default2、定义接口的时候用default来修饰方法default是在java8中引入的关键字,也可称为Virtual ,他的出现是为了解决实现接口的缺陷问题(就是如果想修改接口时,所有实现了该接口的类都需要去修改)datetime:1、DateTime 数字型System.DateTimecurrentTime=newSystem.DateTime();1.1 取当前年月日时分秒currentTime=System.DateTime.Now;1.2 取当前年int 年=currentTime.Year;1.3 取当前月int 月=currentTime.Month;1.4 取当前日int 日=currentTime.Day;1.5 取当前时int 时=currentTime.Hour;1.6 取当前分int 分=currentTime.Minut。这三种函数都是c语言里面需要用到的函数,并且这三种函数的用法都有很多相似之处,在计算时间,事件,数字的时候都可以用这三个函数进行计算。