在String类的constructors中,有一个constructor是将int数组类型转化为字符串:

1 int[] num = {48,49,50,51,52};
2 String numStr = new String(num,0,4);
3 System.out.println(numStr);
View Code

相关文章:

  • 2021-10-12
  • 2022-12-23
  • 2021-08-04
  • 2021-07-31
  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
猜你喜欢
  • 2021-08-24
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2023-01-05
  • 2022-12-23
相关资源
相似解决方案