在网上看到别人的写法:
public static void DateRange(Date start = null,Date end = null):void{
Date start1 = start;
Date end1 = (end != null)? end:(start != null)? new Date(start.getTime()):null;
}请问在取end1的值时,为什么用到new Date(start.getTime()),而不是使用start,为什么要这样写呢
public static void DateRange(Date start = null,Date end = null):void{
Date start1 = start;
Date end1 = (end != null)? end:(start != null)? new Date(start.getTime()):null;
}请问在取end1的值时,为什么用到new Date(start.getTime()),而不是使用start,为什么要这样写呢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货