Why do switch statements continue after case

Posted by John W. on Stack Overflow See other posts from Stack Overflow or by John W.
Published on 2010-04-23T16:46:53Z Indexed on 2010/04/23 16:53 UTC
Read the original article Hit count: 312

After evaluating a case in a switch statement in Java (and I am sure other languages) the following case's are also evaluated unless a control statement like break, or return is used.

I understand this is probably an implementation detail, but what is/are the reasons for having this functionality happen?

Thanks!

© Stack Overflow or respective owner

Related posts about java

Related posts about switch-case