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.
А что если нет элемента в массиве?
Nice :)
why there is a ! before String??
That's the hidden trick... generic arrays don't apply for all types of data types possibles for an array because of the intrinsec nature of the dot operator.
This comment is hidden because it contains spoiler information about the solution
thanks! i simply forgot about it
It is not specified that
haystack
does not containsnull
's. In case ofnull
String#valueOf
will throw aNullPointerException
. Pretty elegant solution though!