我想要给出文件夹名称的所有文件的列表,即它应该在给定文件夹名称的内部遍历?如果我提供任何类似'employee/app'的路径,它应该列出'employee/app'文件夹内的所有文件
当我在java中解析时间时,我将"12:12"作为字符串参数传递,然后我将"Thu Jan 01 12:12:00 IST 1970"作为输出.
我希望今年像"Fri Mar 09 12:12:00 IST 2012"作为输出.
String timestr = "12:12";
Date convertedDate = null;
try {
SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm");
convertedDate = dateFormat.parse(timestr);
} catch (ParseException e) {
e.printStackTrace();
}
System.out.println(convertedDate);
Run Code Online (Sandbox Code Playgroud)
谢谢!