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.