#Strange .split behaviour
11 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @frail copper! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
/run
System.out.println(java.util.Arrays.toString("M3M4M8M8M8".split("M")));
Here is your java(15.0.2) output @outer loom
[, 3, 4, 8, 8, 8]
oh
the empty string at the start is the proper behavior
ok thanks
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.