java 怎么将一个数组转化为对象

如题所述

用Arrays的内置方法可以转化。比如String数据转化成List对象。
String[]
fruit
=
{"apple",
"banana",
"orange"};
List<String>
fruitList
=
Arrays.asList(fruit);
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答