I was looking at the code and I came across this:
public static doSomething(String myString, String myString2) {
How does it work exactly? I know that the resulting .toLowerCase string is assigned to myString (yes, I know the bad practice, since you should not reassign the parameters of the method, in fact they should be final), but I'm not quite sure how the method always gets 2 parameters that it are needed.
I know how this works when myString is null, or at least I think I have, since ternary has myString, null, but I'm not quite sure why it will go there when myString is not zero?
source share