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.
ahhhh you sly dog..okay got that covered now but now I am getting incorrect frequencies..what exactly does that signify?
EDIT: figured it out and solved...thank you for the assistance
ok, that's exactly what I told you: you end up with a string array containing an empty string. So you don't see it in the assertion message, and your first out condition isn't applying because the array isn't empty.
This comment is hidden because it contains spoiler information about the solution
And paste your code here (with proper markdowns and spoiler flag)
I am getting the same error and I used Klopma's workaround method but I still get the AssertionError expected: java.util.Arrays$ArrayList<[]> but was: java.util.Arrays$ArrayList<[]>
then you are wong, I believe. ;)
What I was saying is that I bet that the assertion message doesn't show is that returned list is
List.of("")
while it has to beList.of()
or any other version of an empty list. Problem being that the assertion message show the stringified version of the returned list, in whichList.of("")
will show up in the exact same way thanList.of()
. So there is definitely no issue here and it's just about foloowing the logic of the problem correctly. ;)EDIT: just to make things clear: I even checked that the assertions pass correctly returning any of those:
List.of()
,Arrays.asList()
ornew ArrayList<>()
. So definitely no issue, yeah.I meant HE is right, I think it should not be difference between an empty List and a Array.toList() as the function is expected to return a List
okay, so closing.
@ArturoJafet: those are in the sample tests, you could have seen it by yourself, actually. ;)
You are right, it is a Type bug with empty arrays. I do this workaround: if result.length == 0 return Arrays.asList()
mmm, my bet: your list isn't empty but contains an empty string (that isn't showing up in the assertion message, so). If that's it, close the issue.
with what input? What are you returning exactly (on the coding side: what statement is it on your side?)