Is there any need to Override equals() method to used String datatype in Switch case
-
3aahhhh....... no. It will work just fine as is.Breavyn– Breavyn2013-03-13 09:04:31 +00:00Commented Mar 13, 2013 at 9:04
-
no...................Janny– Janny2013-03-13 09:04:47 +00:00Commented Mar 13, 2013 at 9:04
-
4You can't even override any methods in String. String is final.DanneJ– DanneJ2013-03-13 09:05:17 +00:00Commented Mar 13, 2013 at 9:05
Add a comment
|
2 Answers
If your intention is to use String in your Switch statement then it's better to use
ENUM TYPE