SyntaxFix
Write A Post
Hire A Developer
Questions
like this:
final String str = "This is a long sentence"; final String[] arr = str.split(" ", 2); System.out.println(Arrays.toString(arr));
arr[0] is the first word, arr[1] is the rest
arr[0]
arr[1]