List<Master> masters = ms.queryAllMasters();
List<String> masterReligious = new ArrayList<>();
for (Master master : masters) {
masterReligious.add(master.getMasterReligious());
}
String[] strings = masterReligious.toArray(new String[masterReligious.size()]);
String类型的List转成String类型数组
猜你喜欢
转载自blog.csdn.net/weixin_42273990/article/details/81165563
今日推荐
周排行