52liming

字符串转数组

// 前台传到后台的数据
// ids: id001,id002,id003

String[] ids = new String[]{};
// 分割字符串
ids = request.getParameter("ids").split(",");
List  idsList = Arrays.asList(ids);

数组转List


1.8api :

Modifier and Type Method
String[] split(String regex)
String[] split(String regex, int limit)

Splits this string around matches of the given regular expression.

分类:

技术点:

相关文章:

  • 2021-11-07
  • 2021-11-07
  • 2021-10-08
  • 2021-10-18
  • 2021-10-26
  • 2021-11-17
  • 2021-11-17
猜你喜欢
  • 2021-11-17
  • 2021-11-30
  • 2021-11-17
  • 2021-11-07
  • 2021-09-05
  • 2021-10-08
  • 2021-12-27
相关资源
相似解决方案