public static void main(String[] args) {
String str = "221";
int seconds = Integer.parseInt(str);
int temp=0;
StringBuffer sb=new StringBuffer();
temp = seconds/3600;
sb.append((temp<10)?"0"+temp+":":""+temp+":");

temp=seconds%3600/60;
sb.append((temp<10)?"0"+temp+":":""+temp+":");

temp=seconds%3600%60;
sb.append((temp<10)?"0"+temp:""+temp);

System.out.println(sb.toString());

}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2021-12-31
  • 2021-12-31
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案