Here you can find the source of array(String... strings)
Parameter | Description |
---|---|
strings | Zero or more strings |
public static String[] array(String... strings)
//package com.java2s; //License from project: Apache License public class Main { /**/*from w ww . ja v a 2 s . c o m*/ * Returns an array of strings from the supplied var-args. * * @param strings Zero or more strings * @return {@code String}; may be of length zero */ public static String[] array(String... strings) { if (strings == null) return new String[0]; String[] ret = new String[strings.length]; for (int i = 0; i < strings.length; ret[i] = strings[i], i++) ; return ret; } }