Created
December 12, 2019 03:25
-
-
Save upangka/df2801a82234247bc9d4ea9e24eff70e to your computer and use it in GitHub Desktop.
Arrays.asList 指定类型使用方式
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.vpu.mp.controller.admin.member; | |
import java.util.Arrays; | |
import java.util.List; | |
public class ArraysMainTest { | |
public static void main(String[] args) { | |
String cfg = "realName,mobile,cid,sex,birthday,maritalStatus,education,industryInfo,address"; | |
List<String> res = Arrays.<String>asList(cfg.split(",")); | |
System.out.println(res); | |
} | |
} | |
/** | |
* [realName, mobile, cid, sex, birthday, maritalStatus, education, industryInfo, address] | |
*/ |
Author
upangka
commented
Dec 12, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment