Does Java 7 switch statement with String use equals() method?

The docs say

The String in the switch expression is compared with the expressions associated
with each case label as if the String.equals method were being used.

Since it says as if my guess would be it does not though the internal implementation would be the same as .equals() method.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)