How does Java's switch work under the hood?

Viewed 9904

How does Java's switch statement work under the hood? How does it compare the value of the variable being used, to those given in the case parts? Does it use == or .equals(), or is it something else entirely?

I'm mainly interested in the pre 1.7 versions.

7 Answers
Related