@Deprecated

 /**
     * @deprecated
     * 此方法使用了java.util.Date中弃用的Date(String s)构造函数
     *
     * @param date 日期  格式为(YYYYMMDD)
     * @return Date字符串格式
     */
    @Deprecated
    public String convertDate(String date){
        return new Date(date).toString();
    }

注解@Deprecated 表示弃用,不鼓励使用的程序元素,或者是因为存在更好的替代方案。

猜你喜欢

转载自www.cnblogs.com/ican-fly/p/11283924.html
今日推荐