0
Why the output is two ?
String a public class Example{ public static void main(String args[]){ String a ="one", b="two"; String str=String.join(a,b); System.out.println(str); } }
6 ответов
+ 3
yeah thanks!!
Jamie, I got it..
+ 2
ok, then if I add one more variable c=“two”
then the output will be “twoonetwo” as u have told, first parameter is delimeter. however, if I add one more variable then why can’t be the first parameter is not delimeter?
+ 1
public class Example{
public static void main(String args[]){
String a ="one", b="two",c="two";
String str=String.join(a,b,c);
System.out.println(str);
}
}
The output is: twoonetwo