Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
You are absolutely right, there is no need for this
This comment is hidden because it contains spoiler information about the solution
Concatenation is way more readable and it might even be the tiniest amount more efficient
This comment is hidden because it contains spoiler information about the solution
Fixed. Next time, mention the language when reporting an issue.
There's nothing strange here))
I kindly advise you to refine your knowledge of how the String class and its siblings that implement CharSequence interface work under the hood.
Quick answer: every string instance maintains an array of bytes (from Java 9, prior - an array of chars) and it's simply impossible to create an array of length less than 0 or greater than Integer.MAX_VALUE (note that there're far more strikt limits for string literals).
So there's nothing wrong with this solution. And yep, that is good practice.
The actual usage of long type argument in this method is pointless, you have to downcast or may do some tricks) But at the end of the day result is the same.
This comment is hidden because it contains spoiler information about the solution
Please use spoiler flag next time. Your message is visible from the dashboard.