Let's continue our practice with Java Strings
.
Write a function called isEqual
that takes two String
arguments.
It should return true
if they are both null
or equal, and false
otherwise.
Don't overthink this!
If you are using a loop or writing more than a few lines of code, review the String
documentation.
Stuck? You may find these lessons helpful: