This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
One of the main differences is that a switch allows for cumulative actions via fall through.
Also switches only work for tests on byte, short, char, and int primitive data types, as well as enumerated types (i.e. Enums). (Although there was a proposal for a new feature in Java 7 to allow the use of Strings in Switches. We'll have to see if that actually happens.)
I do not believe one is any more efficient than the other. The choice of using a switch statement of a if/if-else/.../if-else/else block is one of which is easier to read and understand. In some cases a Switch statement allows for cleaner code that is more readily apparent as to what is being done. But to be honest, switch statements are not used a whole lot. Many developers even forget they exist [ December 11, 2008: Message edited by: Mark Vedder ]
You can do the same kind of things with a switch statement and a set of if / else if statements.
Don't choose one over the other because you think one is more efficient than the other. Such micro-optimizations almost never make sense. I agree with Mark that you should choose whatever makes your code easier to read and understand. [ December 12, 2008: Message edited by: Jesper Young ]