Exception in thread "main" java.lang.NumberFormatException: For input string: "2016/09/12 09:41:48"

挺奇怪的一個問題,多是本身自己的基礎不牢固因此困擾了好久! 原本是想要把文件的最後訪問時間改成當前的時間,而後獲取時間是這樣的:java SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); String nowDate = sdf.format(date); 給文件設置最後訪問時間是這樣的:web
相關文章
相關標籤/搜索