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.
Thank you very much! understood
This comment is hidden because it contains spoiler information about the solution
please see my revised comment. if youre reading this in your email, you may not see my edit.
Hello! I just did some thinking. Did you see what error your failed tests returned? You're right in the sense that (a && b) == (b && a) when it comes to truthfulness. However, by not checking for null first, you're opening yourself up to a NullPointerException, as 'null' isnt treated as equivalent to 'false' by the compiler.
When you do a null check first, you prevent this from happening. The compiler reads from up-down, left-to-right, so if your AND statement fails in the first condition, the second condition will never evaluate, as the statement is already false. Consider it a compiler optimization. I mainly did it to save LOC, instead of having a separate if statement for the null check.
Best of luck in your learning!
This comment is hidden because it contains spoiler information about the solution
;)
This comment is hidden because it contains spoiler information about the solution
Half of your solution is OK. Now you only need to work on the iterations part.
This comment is hidden because it contains spoiler information about the solution
Woo! Gauss's formula