java
package test;
public class primitiveelement {
public static void main(String[] args) {
printString();
printString(new String[] { "str1", "str2", "str3" });
printString("s1", "s2", "s3");
}
public static void printString(String... str) {
for (String item : str) {
System.out.println(item);
}
System.out.println("\n");
}
}