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.
The difference is how you can call this function. The array variant can only be called with an array
while the varargs variant can be called with an array or with separate arguments
and the java compiler will create the array for you under the hood.
Thank you for the most helpful comment. You must be a god in development.
I agree that this is cheating even though I have the same solution.LOL
I wouldn't, to be honest. Technically it could be useful if you still need the side effects of
case1
andcase2
or something, which you wouldn't always get fromcase2 if condition else case1
, but there are less confusing ways to write that.Yes