I am using switch{case ()} with String in java, and so far it seems to be working perfectly. But I want to confirm before continuing too much; is this safe?
I mean, I know that I should not be doing if ("hi" == "hi"), but should be doing "hi".equals ("hi") because String refers to a reference point...
I am not too sure how switch works, and I have not been able to confirm from any of my sources...
Thank you!!