字符串前面或后面补零

2017/08/23 问题一箩筐

List 转换为 String数组

List<String> list = new ArrayList<String>();    
list.add("a1");    
list.add("a2");    
String[] toBeStored = list.toArray(new String[list.size()]);  

String数组转List

String[] arr = new String[] {"1", "2"};  
List list = Arrays.asList(arr);

Search

    欢迎关注我的微信公众号

    Yannis的程序人生

    Table of Contents