其他分享
首页 > 其他分享> > Arrays.asList

Arrays.asList

作者:互联网

import java.util.Arrays;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        StringBuffer sb=new StringBuffer();
        String [] str= {"ipad", "mini", "8"};
        List<String> list = Arrays.asList(str);
        for (int i = 0; i < list.size(); i++) {
            sb.append(list.get(i)+" ") ;
        }
        System.out.println(sb);
    }
}

 

标签:java,String,Arrays,StringBuffer,list,sb,asList
来源: https://www.cnblogs.com/wangchuanfu/p/15507604.html