Java之获取年月日时分秒字符串

/**
	 * 生成随机图片文件名,年月日时分秒格式
	 */
	 String getString() {
		Date date = new Date(System.currentTimeMillis());
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
		String string = simpleDateFormat.format(date);
		return string;
	}
苟利国家生死以, 岂因祸福避趋之
原文地址:https://www.cnblogs.com/chintsai/p/11829221.html