Dear all,
In Java, we can use variadic function in the following way:
public Set packStrings(String...strings){
for (String str : strings){
//Do something on the str
}
//How to convert strings into a Set?
}
My question is, what is the type of "strings"? is it String[]? How to put the string(s) denoted by the "strings" into Java Collection, such as Set or List?
Please kindly advise.
Thanks & regards, William Choi