hexDateTime = hexDateTimelength 6 0repeat6 - hexDateTimelength + hexDateTime hexDateTime;优化
可以使用 String.format 方法来简化代码,如下所示:
hexDateTime = String.format("%06x", Long.parseLong(dateTime));
原文地址: https://www.cveoy.top/t/topic/fhFq 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
可以使用 String.format 方法来简化代码,如下所示:
hexDateTime = String.format("%06x", Long.parseLong(dateTime));
原文地址: https://www.cveoy.top/t/topic/fhFq 著作权归作者所有。请勿转载和采集!