+ 1
Why string is final in java? Or how to split string in java.
4 Respostas
+ 2
String a[] = "JavaScript".split("S");
System.out.println(a[0]);
System.out.println(a[1]);
//Output:
Java
cript
+ 1
That string is final only means, that you can not change string after creating, even though string is a sequence of characters and you are able to index it, but you can't change string values, like you would change values in an array.
+ 1
Thanks seb